Hello,
I'm having an issue with getting the Dialogue System variables to load properly when loading a saved game from a different scene (Main Menu for example) and with the Extra Databases component.
When I choose the save file to load from the Main Menu (or any other different scene), and the scene is loaded using Load Game From Slot, every Saver component and everything else works fine except for the variables in the Dialogue system that don't get set.
But if I load the save file again AFTER I'm already in the scene, then the dialogue variables get set properly.
I'm using the Extra Databases component which loads the extra dialogue database OnStart and is synced with my Global Database which holds constant variables related to the Player.
Once I disabled the Extra Databases component the variables then also got set properly once I loaded the game.
However, if I disable the Extra Databases component and go to the scene without a save file, then the NPCs lose their connection to the Dialogue Database since it never got loaded.
What can I do here? I thought I could use Apply Saved Game Data but that action has a problem that creates a duplicate of any Spawned object every time it's called even when the spawned object is already in the scene
Thank you
Question about Extra Databases component
Re: Question about Extra Databases component
Hi,
Try setting your Save System component's Frames To Wait Before Apply Data to 1 or higher.
Try setting your Save System component's Frames To Wait Before Apply Data to 1 or higher.
-
- Posts: 24
- Joined: Fri Sep 22, 2023 5:05 pm
Re: Question about Extra Databases component
I've put it up to 30 frames to see if it would do anything but it doesn't, the variables still don't get set. I can try loading the Database just before the first conversation, do you know if that would make a difference considering 30 frames didn't? Since also disabling the Extra Database component to load the database sets the variables correctly.
I'll try tomorrow!
-
- Posts: 24
- Joined: Fri Sep 22, 2023 5:05 pm
Re: Question about Extra Databases component
Okay, I found a fix.
Using the PM action "Add Dialogue Database" fixed the issue, variables are now set properly when loading the scene from another scene. I don't know what exactly the difference between this and adding the database with Extra Databases component is, but well, it's working now.
Using the PM action "Add Dialogue Database" fixed the issue, variables are now set properly when loading the scene from another scene. I don't know what exactly the difference between this and adding the database with Extra Databases component is, but well, it's working now.
Re: Question about Extra Databases component
Hi,
Extra Databases will load its databases in Start(). If the scene starts paused (e.g., Time.timeScale=0), Start() won't run. Maybe that was the issue. Anyway, I'm glad you found a solution!
Extra Databases will load its databases in Start(). If the scene starts paused (e.g., Time.timeScale=0), Start() won't run. Maybe that was the issue. Anyway, I'm glad you found a solution!
-
- Posts: 24
- Joined: Fri Sep 22, 2023 5:05 pm