Is there a built-in method of having global variables between scenes in Unity?
I’ve read of ways to use the PlayerPreferences or use game objects that have DontDestroyOnLoad but they feel like work-arounds to me. If there isn’t a built-in method, then I guess I’ll go with the gameobject DontDestroyOnLoad way.
A global variable is a variable with global accessibility (mmm scope?) in the C# namespace. It sounds like you’re talking about data persistence.
If you’re experienced enough to update this tutorial as you go it covers the basics (it only requires a couple line changes and the using SceneManager include and it works)
It shows how instrumental understanding code is to using Unity for anything more than a rudimentary single-scene game.