I’m new to the whole individual scripts in a WYSIWYG editor style of programming, and I’m used to your standard procedural and OOP C/C++ paradigms.
With that sort of programming environment I would often have quite a few global variables that I use to store information that will be used by the methods of all sorts of classes throughout the entire project. Stuff like game state and that sort of thing.
With Unity, would I just have a gameobject whose only component is a script that contains these “global” variables? In other scripts would I be able to access and modify that script’s variables, or would each script that wants access have to have its own copy of the variable to read the data into and then communicate any changes back to the “master global variable list?”
Sorry if I’m way off or if this is well documented… I’ve been reading over the docs for the past few days and this question has continued to stump me.