As above. This would be really helpfull in some case. On front-end inspector should find all method or field with T1 in param/type but, unlike standard UnityEvent, hide field parameter in inspector (last input field in inline element of delegate list) since parameter is feeded in code instead of in inspector
Hi, because of restrictions in Unity core we can’t serialize generics. But you can do this:
[Serializable]
public class ButtonClickedEvent : UnityEvent <string>{ }
This will allow binding to string functions and the argument that is passed will be the one that is used for the ‘invoke’ call.
i know, however List is supported? So there is chance for support in future?
your example is good enough though
Edit:
I tested it recently it work but i saw input for parameter isnt blocked and no constraint to method with string only - thats why i ask for support out of the box
Hi, because of restrictions in Unity core we can’t serialize generics. But you can do this:
[Serializable]
public class ButtonClickedEvent : UnityEvent <string>{ }
This will allow binding to string functions and the argument that is passed will be the one that is used for the ‘invoke’ call.
eee what shit happen? here and there spam…