How to create an event trigger script for intercepted events
I have a GameObject
with a range of events that the it responds to.
There are a few ways I could handle the events in this GameObject
. I could extend the script and use it to do the specific tasks I wanted each individual button to do.
I could also write a new script with all the events I wanted to use in and then just hard code the functions in there. This would prevent any of the initial behaviour of the events being overwritten.
However, these are not the approaches I wanted to take.
I want to use a script that allows a user to interact with it like Event Trigger
does.
The problem is I am not familiar with how to detect events on a GameObject
like Intercepted Events shown in the first image does, and I do not know how to serialise the input so that a user can manage it in the unityeditor like Event Trigger
does.
I'd appreciate any help in creating a solution that does this