I recently stumbled upon the UnityEngine.Events.UnityEvent class, and it seemed pretty cool so I started using it in a project.
Then I decided that I wanted to add some parameters to the event using its generic variants, like so:
[System.Serializable]
public class BarkEvent<GameObject> : UnityEvent<GameObject> {}
public class MyOtherClass : MonoBehavior {
public BarkEvent<GameObject> bark;
// ... Other stuff ...
}
But now it doesn't show up in the editor, making it harder to wire up my subscribers. Is there a way to make unity events with extra arguments show up in the Unity editor?
BarkEvent<GameObject>
to justBarkEvent
in both instances. I can't really try this out but if this works, please try and turn it into an answer :) \$\endgroup\$ – John Hamilton Apr 13 '17 at 5:59