I’ve never seen it done this way.
The two suspicious things to me are:
- line 11 calling new on a Unity-ish object (might be legit, this might just be a POCO class)
- line 14 adding it in
Does it work if you just manually add the EventTrigger to the GameObject, give yourself a public reference to EventTrigger, and from there add a listener to it??
ALSO, FYI, remember the first rule of GameObject.Find():
Do not use GameObject.Find();
More information: Regarding GameObject.Find · UnityTipsRedux
More information: Why cant i find the other objects?