R
R
Rag'n' Code Man2019-09-29 20:43:14
Unity
Rag'n' Code Man, 2019-09-29 20:43:14

Why doesn't the Event Trigger component work?

Hey! I'm making a clicker, the essence of which is pressing one red button and getting in-game currency for it.
I have a problem with this button.
I created 3 methods which are called during PointerDown, PointerUp and Click.
I hung an Event Trigger on the button and hung these methods on it, respectively. Nothing worked.
After 2 hours of trying to fix my script, I tried to just output Debug.Log()on click. It turned out that he simply did not see my clicks, although the box collider and, just in case, the Rigid Body were connected.
I've looked all over the Internet, but I still haven't found a similar case...
It's funny, but when I did it using the OnMouseDown and OnMouseUp methods, everything worked, but because of the lack of the OnClick method, I had to switch to Event Trigger.
Please help! (I'm a green newbie)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question