I keep getting this error every time I reset the game, is not always, but 1 every 3 times I reset a scene. It's only happening if I don't have the "Destroy On Load" tick. The reason why we want that is because, if the player resets the level we want to reset the dialog and dialogs are quest dependent. I'm not sure if its a bug, or what, any suggestions?Some objects were not cleaned up when closing the scene. (Did you spawn new GameObjects from OnDestroy?)
Some objects were not cleaned up when closing the scene. Bug?
Some objects were not cleaned up when closing the scene. Bug?
I just implement this in tool in my game, and I noticed that resetting a level cause the following error:
Re: Some objects were not cleaned up when closing the scene. Bug?
Hi,
Thanks for using the Dialogue System! When reloading a level, use the LevelManager component, for example:
or, since you're not keeping the Dialogue Manager, call PersistentDataManager.LevelWillBeUnloaded to tell components such as PersistentDestructible and IncrementOnDestroy that they're being destroyed because the level is being unloaded:
Also, if you're using IncrementOnDestroy and you're using version 1.8.0 or earlier, please download an updated copy of the script from the Dialogue System Extras page. Under "Updated Support Packages", expand the 1.8.0 or 1.7.7.3 foldout and download the package. It's the same package for both foldouts.
Thanks for using the Dialogue System! When reloading a level, use the LevelManager component, for example:
Code: Select all
FindObjectOfType<PixelCrushers.DialogueSystem.LevelManager>().LoadLevel("my level");
Code: Select all
PixelCrushers.DialogueSystem.PersistentDataManager.LevelWillBeUnloaded();