when print healthPoints at Start(), RestoreState(), the logger will show healthPoints at Start() twice times, and at RestoreState() one time. But, it shows first time at Start(), then another time at RestoreState(), finally another time at Start().
So I change code of SavingSystem.cs to make RestoreState() will be called at the end after the scene is actually loaded
Reference: Unity - Scripting API: SceneManagement.SceneManager.LoadSceneAsync
in Portal.cs:
yield return SceneManager.LoadSceneAsync(SceneToLoad);
=>
AsyncOperation asyncLoad = SceneManager.LoadSceneAsync(SceneToLoad);
while (!asyncLoad.isDone) { yield return null; }