Alerts on loadFromSlot
Re: Alerts on loadFromSlot
I think i kinda understand how the BeforeSceneChange/LevelWillBeUnloaded works, and as i wrote in the code, im calling it right before the SceneManager.LoadSceneAsync(). Now, im using the MultiActiveSaver with GameObjects that have the IncrementOnDestroy component attached to them, which leads me to think that when the scene starts, the MultiActiveSaver restore the active state of the gameobjects, and therefore the IncrementOnDestroy component reacts to it, how could i avoid that? or the BeforeSceneChange/LevelWillBeUnloaded are supposed to prevent this behaviour?
Re: Alerts on loadFromSlot
If you're loading the Ingame scene and then unloading the login scene, then the IncrementOnDestroy GameObjects in the Ingame scene shouldn't be getting destroyed at all. What's causing them to trigger?
Re: Alerts on loadFromSlot
Im not destroying the objects, they are just being set to inactive by the MultiActiveSaver. what i have is a GameObject which has a MultiActiveSaver which has reference as objects to watch, to his childs, which each one has an IncrementOnDestroy component. What i believe is happening is that as soon as the ingame scene loads, and i call the LoadFromSlot, the MultiActiveSaver restores the referenced objects to their active states(which would be false in my case), which causes the IncrementOnDestroy objects to trigger, therefore, the alerts pop up.
Re: Alerts on loadFromSlot
Got it. That's an oversight on my part. This patch should address it:
PixelCrushers_ActiveSaverPatch_2020-07-24.unitypackage
Before the ActiveSaver/MultiActiveSaver component sets a GameObject inactive when restoring save data, it tells the GameObject's components to ignore the OnDisable message.
PixelCrushers_ActiveSaverPatch_2020-07-24.unitypackage
Before the ActiveSaver/MultiActiveSaver component sets a GameObject inactive when restoring save data, it tells the GameObject's components to ignore the OnDisable message.
Re: Alerts on loadFromSlot
I imported the pacakge and sadly it didn't fix the issue, could it be that im missing something?
Re: Alerts on loadFromSlot
Darn it, I had a typo in MultiActiveSaver. ActiveSaver was fine, though. Here's an updated package:
PixelCrushers_ActiveSaverPatch_2020-07-25.unitypackage
Also, make sure to put the Dialogue Manager prefab in your login scene, and add a DialogueSystemSaver to it.
PixelCrushers_ActiveSaverPatch_2020-07-25.unitypackage
Also, make sure to put the Dialogue Manager prefab in your login scene, and add a DialogueSystemSaver to it.
Re: Alerts on loadFromSlot
That did the trick, thanks a lot for your help.