I am making a game where you get into random encounters and are moved to another scene where a turned based battle takes place. I need to save my players health for when he moves back into the world scene and then load it again once he re-enters the battle scene. I’m pretty new to javascript so please try to bear with me. Thanks in advance.
You can use PlayerPrefs!
PlayerPrefs.SetInt("Health", player_health); //Stores the health variable
player_health = PlayerPrefs.GetInt("Health"); //Retrieves the health variable
Another example here.