- Home /
how to transport a selection from scene to scene
Hi there,
I have a little question :
- I have a scene with a GUI
- and I have a Level scene
If I select an option with a checkbox in the GUI scene, how can I use that choosen variable in the next scene ?
I'm using JavaScript.
Comment
Answer by Joshua · Apr 30, 2011 at 02:28 AM
When you go from scene to scene all objects and scripts will be destroyed and the variables will lose their values. To counter this use DontDestroyOnLoad to keep the script's object and therefore the script alive between scenes.
thanks that should solve my problem. and thanks for the quick answer:)