public override void Enter() { base.Enter(); contentManager.enabled = true; settingsButton.FadeIn(); if (storyJSON == null) { Debug.LogWarning("Drag a valid story JSON file into the StoryReader component."); enabled = false; } story = new Story(storyJSON.text); StartCoroutine(OnAdvanceStory()); }
public override void Enter() { base.Enter(); contentManager.enabled = true; settingsButton.FadeIn(); if (storyJSON == null) { Debug.LogWarning("Drag a valid story JSON file into the StoryReader component."); enabled = false; } story = new Story(storyJSON.text); StartCoroutine(OnAdvanceStory()); if (PlayerPrefs.HasKey("inkSaveState_stefanovaigra")) { string savedState = PlayerPrefs.GetString("inkSaveState_stefanovaigra"); story.state.LoadJson(savedState); } }