Before the AC update, everything worked flawlessly. After the update, loading the first scene for the first time still works just fine. If you change scenes, it still works. But when you switch back to the original scene, it breaks the game. I get the following console error:
Code: Select all
MissingReferenceException: The object of type 'RememberDialogueSystem' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
AC.LevelStorage+<UnloadScriptData>d__29.MoveNext () (at Assets/AdventureCreator/Scripts/Save system/LevelStorage.cs:751)
AC.LevelStorage+<LoadSceneData>d__19.MoveNext () (at Assets/AdventureCreator/Scripts/Save system/LevelStorage.cs:437)
AC.LevelStorage+<ReturnCurrentLevelData>d__7.MoveNext () (at Assets/AdventureCreator/Scripts/Save system/LevelStorage.cs:165)
AC.SaveSystem+<InitAfterLoadCo>d__47.MoveNext () (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:755)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <ad50157ee00e45cdb3c8bd67012f8804>:0)
I removed the Remember Dialogue System component as a test, and replaced it with a regular AC remember component (Remember Visibility). This broke the game too.
From what I understand, Dialogue System makes the first scene's manager persistent, but when you leave and return to that scene, the manager will naturally be there in the hierarchy again. DS takes care of this by destroying the non-persistent copy that 'respawns' whenever you reenter the scene. What might be happening here is that after the AC update, DS is destroying the non-persistent copy before AC has the chance to load its Remember component? Maybe? But again, this didn't happen before the update.
Any advice? Chris from AC said I could try creating a new first scene, which is never visited again, and moving the DM to there, but while this might work, it would be a nightmare to work on the game without being able to load scenes in a different order for quick testing.