hey guys!
I am incredibly new to C++ and UE4 and was wondering: what is the best way to handle variables in a project?
I was thinking it might be a good idea to have a class full of variables where everything important is stored in the one place.
Think about a UE4 map, every object is stored in the map with details on where it is and how it is positioned, every object accesses that main ‘master file’ (the map) and gets information about where it’s suppose to be (or the map tells objects, rather than objects querying for information). I was wondering if it is efficient (or even a remotely good idea) to have the same approach with variables; to have a ‘master’ class full of all important variables for objects/actors so that everything is stored in the one place and relatively easy to get to or reference.
Is this a good idea or does it just create unnecessary references in memory? Is this even good practice or am I thinking in an out-of-date fashion?
Any improvements on the way I’m thinking are extremely welcomed,
Thanks guys!