1
Technical forum / Variables - scene scope
« on: September 07, 2015, 11:40:58 PM »
Hopefully a quick question, in need of just a quick answer. I want to make sure I'm not moving forward doing things incorrectly.
I have a scene with many scripts. The scripts need to access a lot of the same variables. Once the scene is over, most of the variables won't be needed anymore.
Right now, in order for the scripts to access a lot of the same variables, I've set them up as Global (but not in base.inc).
It seems like this is the way to do it, right? And once the scene is over, I can set these to null, so they take up less memory. I just want to make sure there isn't another (or better) way to share variables within the scope of a single scene.
Thanks!
I have a scene with many scripts. The scripts need to access a lot of the same variables. Once the scene is over, most of the variables won't be needed anymore.
Right now, in order for the scripts to access a lot of the same variables, I've set them up as Global (but not in base.inc).
It seems like this is the way to do it, right? And once the scene is over, I can set these to null, so they take up less memory. I just want to make sure there isn't another (or better) way to share variables within the scope of a single scene.
Thanks!