Help with the Event System!

DeadLik

New member
Hello, I can not figure out the Event System, wrote a test script, hung it on the camera, applied the Event System on the zoom, Event does not work when approaching, away, what am I doing wrong?

Screenshots:
Screenshot_1.jpgScreenshot_2.jpgScreenshot_3.jpgScreenshot_4.jpgScreenshot_5.jpgScreenshot_6.jpg
 
This is more related to C# but in your screenshot you aren't registering for the events so they'll never be received.
 
This is more related to C# but in your screenshot you aren't registering for the events so they'll never be received.

Tell me then on points
EventHandler.RegisterEvent(object obj, string name, Action handler)
1. object obj - What is indicated here
2. string name - Is there any name here?
3. Action handler - At this point, specify the method that I will perform in the code?
 
This is the object that should receive the event


This is the name of the event that you want to register.


Yes, this is the method that you want to execute when the event is called.


Everything set up correctly, does not work

Screenshot_1.jpg

Screenshot_2.jpg

Screenshot_3.jpg

Is empty
Screenshot_4.jpg
 
The Unity event system and the built-in event system are different. Unless the "Ven" event is sent the built-in event system will never trigger.
 
You'll need to execute the "Ven" event:

Code:
EventHandler.ExecuteEvent(gameObject, "Ven");
 
You'll need to execute the "Ven" event:

Code:
EventHandler.ExecuteEvent(gameObject, "Ven");

What I'm doing wrong is that I registered the event in Awake (), when I press zoom, the Kerk () event is fired which triggers the Event and calls the Ven () function. but nothing happens

Screenshot_1.jpg

Screenshot_2.jpg
 
Right clicking won't change view types or perspectives. A perspective switch occurs between first and third person, and the view type needs to be set through script or states.
 
Right clicking won't change view types or perspectives. A perspective switch occurs between first and third person, and the view type needs to be set through script or states.

Ok, I wanted to set it up so that when the zoom is on an event occurs, can this be set up?

Right clicking won't change view types or perspectives. A perspective switch occurs between first and third person, and the view type needs to be set through script or states.

For example, when zoom slowed down time
 
There currently are no events that execute when you zoom. I can add an event to the next release though :)
 
Top