I know about static voids, but I’m wondering if there’s a way to have that function called by any object, then any object can react to that function being called.
For example, let’s say I have a public static void Alarm. This can be called, say, by a camera when it spots the player, or a laser when the player touches it, and so on. I know this can be done using a static void. What I’m wondering is if there’s a way for any GameObject to know when this void has been called - so for example a light might start flashing or something.
In brief: is there a way to make a void any GameObject can call, and any GameObject can also tell when it has been called?
Thanks in advance for any help.