- Home /
Should I use EventTriggers as a component or as a superclass for another component?
Correct me if I'm wrong, but from the EventTrigger documentation, it appears as though there are three separate ways to use EventTriggers.
Method 1: Attaching an EventTrigger as a component to a gameObject. (Discussed in NOTE)
Method 2: Extend EventTrigger, and overriding the functions for the events you are interested in intercepting. (Discussed in Example 1)
Method 3: Specifying individual delegates. (Discussed in Example 2)
Are there an advantages or disadvantages for choosing one of the three methods over the others? I'm especially curious as to why to choose Methods 2/3 over Method 1.
Your answer
Follow this Question
Related Questions
Triggering events for overlaying UI Elements. 0 Answers
Creating a custom slider - should I be invoking a UnityEvent onValueChanged? 0 Answers
UnityEngine.EventSystems.. Trying to figure it out .js 1 Answer
How do I asign this script to a button successfully? 1 Answer
EventTrigger touch, detect dragging your finger off a button. 0 Answers