Signal Receiver functions

Hi,

I’m able to add Reactions to a Signal Receiver that take a simple type - string or - int - and specify that value in the inspector, and have it get through to the function. YES!

When I try using an enum though, I can no longer use that function in the Signal Receiver; its not selectable from the drop down.

eg,

    public enum MyType
    {
        None,
        Something
    }

public void MyReaction(MyType vaue) { ... } <--- cannot use this

Any ideas?

Hi, any thoughts on this anyone?

I believe that is a limitation in the UnityEvent system (which signal receivers use). It only handles certain types of parameters. You can create your own receiver using a Monobehaviour (Unity - Scripting API: Playables.INotificationReceiver.OnNotify) on the gameObject with the signal receiver as a workaround.

1 Like