So i’ve got a C# script that sends a message to a variable gameobject using
Target.SendMessage
I need to create a script that can receive a certain message, for example if my script sends a message called “Toggle” the receiver script should recognize this message and use the single message signal to toggle a boolean.
In example if you’ve got a switch which you press, it sends a single message called toggle, The receiver script recognizes this message and toggles a bool on and off each time it receives this message.