How do I Broadcast to all gameobjects so I can for example make a boolean turn off for all gameobjects instead of just one by one ?
You can’t.
No such thing as BroadcastAll(). You have to find all gameobjects and do it manually.
Use a static variable.
class Globals {
var bool : Boolean;
}
Now anything can do:
Globals.bool = false;
Could you please elaborate on static variables please ? and the class deal ? I have seen it many times in other peoples script, but I have yet to understand them.
Getting
The class defined in script file named ‘Settings’ does not match the file name!
I put
you can use FindGameobjectsOfType specify it as gameobjects, then in the foreach loop, use the Broadcast function. Be careful but it’s computational expense to do in a loop.