In the SavingWrapper.cs script the line: StartCoroutine(LoadLastScene()); in the awake function keeps crashing Unity whenever I hit play. Anyone have any idea why? I assumed it was because I didn’t have a default save file yet, but even after commenting the line out, playing the game, and making a save, I still get crashes after uncommenting the line in Awake.
I am experiencing similar issues…not sure if its related but if I put the coroutine code in a Start() method, it results in an endless loop of loading and destroying the scenes attempting to be loaded. Would be eager to hear if anyone else ran into this and figured it out!
Edit: Figured out my problem, my scenes still had the PersistedObjects prefab so when the scene loaded it automatically called LoadLastScene which caused the loop. Deleted the prefab from my scenes and everything loaded correctly.
1 Like