Question about active saver

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Lucian1899
Posts: 22
Joined: Wed Dec 13, 2023 9:23 am

Question about active saver

Post by Lucian1899 »

Hi,

I have an UI canvas in my first scene and set it as DontDestoryOnLoad,it has several layers and many child objects, and I add an active saver component to it. During the game, some of its child objects will become active, but here comes the save problem.

I use On Conversation End trigger to activate those child objects, their active state can be saved when I change sences, S/L, back to main menu(only in play mode).but when I back to edit mode and play the game again, I found their active state can not be saved when I load the game. Could you please tell me which step I did wrong, or I missed something? Thank you!
User avatar
Tony Li
Posts: 23427
Joined: Thu Jul 18, 2013 1:27 pm

Re: Question about active saver

Post by Tony Li »

Hi,

ActiveSaver and MultiActiveSaver components must be on GameObjects that are active when the scene starts. Is your ActiveSaver component on a GameObject that is active when the scene starts?

When you enter play mode a second time, are you loading a saved game? The save system will not automatically restore your last saved game. You can use an AutoSaveLoad component to do this, or you can load a saved game manually using the C# method SaveSystem.LoadFromSlot(#) or SaveSystemMethods component.
Lucian1899
Posts: 22
Joined: Wed Dec 13, 2023 9:23 am

Re: Question about active saver

Post by Lucian1899 »

Hi,
ActiveSaver and MultiActiveSaver components must be on GameObjects that are active when the scene starts. Is your ActiveSaver component on a GameObject that is active when the scene starts?
Yes, the father object is active when the scene starts.
When you enter play mode a second time, are you loading a saved game? The save system will not automatically restore your last saved game. You can use an AutoSaveLoad component to do this, or you can load a saved game manually using the C# method SaveSystem.LoadFromSlot(#) or SaveSystemMethods component.
I think I loaded a saved game, I'm using the Dialogue System Menu Framework. Here are my menu system and dialogue system, I don't know if I did something wrong, thank you!
Attachments
2.png
2.png (27.81 KiB) Viewed 67 times
1.png
1.png (27.18 KiB) Viewed 67 times
User avatar
Tony Li
Posts: 23427
Joined: Thu Jul 18, 2013 1:27 pm

Re: Question about active saver

Post by Tony Li »

How are you changing scenes? Please see How To: Change Scenes With Save System. See also: How To: Manage Player Controls and Scene Changes.

When you're in the main menu scene, are you using the "Load Game" or "Continue" buttons to load a saved game?
Post Reply