Hello How can I continue the game without losing values after Game Over? Let’s say Game Over happened and my Player object disappeared from the scene and the player will be able to continue the game by watching an ad. How can I continue the game without losing values such as gold and score? I save my values with playerPrefs. I write this but all values are zero. I guess these games also have an update because new scene has been uploaded.
public void watchRewardedAdResumeGame(object sender, Reward args)
{
SceneManager.LoadScene("Level");
PlayerPrefs.SetInt("Gold",PlayerPrefs.GetInt("Gold") + goldResume);
goldResume=PlayerPrefs.GetInt("Gold");
goldText.text="Gold: " + goldResume;
PlayerPrefs.SetFloat("score",PlayerPrefs.GetFloat("score") + scoreResume);
scoreResume=PlayerPrefs.GetFloat("score");
scoreText.text=((int)scoreResume).ToString();
}