- Home /
Save scene state after reloading[solved]
Hi guys, I have a question about how I can save current state of a scene. Let's take the following example. I have two scenes, in each of them I have an empty object which has some scripts attached for first time configurations. After the script does it's job, the empty objects are destroyed. If from scene1 I go to scene2, and then i want to go to scene1 again, i don't want that empty object reappear and call those scripts again. How can I do that?
LE: Since the game runs on Android I separated my main scene which is basically a 2 story house into 2 different scenes because I wanted it to run smoother even on low-end smartphones. Since each story holds around 15-20k verts. So everytime I want to go upstairs or downstairs i will switch between scenes. Is this too much ? Should I consider merging those 2 scenes (again) ?
Should I create some variable and save it in PlayerPrefs and check the value in it, and only execute the script if its the very first load ? Is this a good idea , or what is the best approach performance wise. The game will run on Android, so I need it to be as optimized as it can be.
I want to do same thing, please guide me over it :) i see solved but cant see any answer.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Application.LoadLevel problem. 1 Answer
Physics Seem Broken When Loading a New Scene 0 Answers
Application.LoadLevel() changes lighting for some reason? 12 Answers