- Home /
switching scenes
im currently working on a third person shooter and i have three separate scenes for each level. I already created triggers to change scenes and they work perfectly...but when i switch the scenes, my players health and ammo resets (i know the reason behind this is because in each scene , a new player prefab is added which resets all the script variables)...
how can i make it so when i switch a scene, all variables stay the same because i want to later implement picking up new guns but I can't start that if each time i switch scenes, my player is reset back to default.
I'm fairly new to all of this so if possible, provide a script or a good reference to start from.
Thanks in advance
Answer by uhahaha · Dec 17, 2010 at 09:46 AM
This has been answered multiple times:
http://answers.unity3d.com/questions/5736/scene-to-scene-variables
Your answer
![](https://koobas.hobune.stream/wayback/20220613091431im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Optimize my game? 2 Answers
Checking a file 1 Answer
Load a Level on Touch 1 Answer
Beginner's Networking Questions 0 Answers
Switch scenes after animation completes? 0 Answers