Hello. I am trying to add lives into my game, Combat Dodger. However, I use separate scenes for each level. Every time you make it to the next level, it sets the lives back to maximum. How do I make it so I have a variable that is static across all scenes? I want it so when I load my next scene, the variable stays. As far as I know, static variables only work with the current scene. This may or may not be true. Any ideas?
I have found out my problem. I used the function DontDestroyOnLoad, and apparently static variables work, but can be glitchy. Got this off of the IRC.