Merging code from different developers
Re: Merging code from different developers
Yes - adding a delay definitely helped, but these quests don't survive to the second scene when I run the project. Please let me know if you have a solution - thanks.
- Attachments
-
- updated.zip
- (7.38 KiB) Downloaded 20 times
Re: Merging code from different developers
Is there a reason why you're killing the Dialogue Manager when switching from scene 1 to scene 2? This will dump its state, including quest states and variable values.
If you must do that, remember to add a Dialogue System Saver component to the Dialogue Managers in both scenes, and set the same key for each. (But a different key from any other savers.) The Dialogue System Saver will save the Dialogue Manager's state before leaving scene 1 and then apply it to the Dialogue Manager in scene 2.
If you must do that, remember to add a Dialogue System Saver component to the Dialogue Managers in both scenes, and set the same key for each. (But a different key from any other savers.) The Dialogue System Saver will save the Dialogue Manager's state before leaving scene 1 and then apply it to the Dialogue Manager in scene 2.
Re: Merging code from different developers
I had some difficulties with the persistent dialogue manager (I think it was a problem with scene events), so I added a dialogue manager to each scene. But I'll try out these two solutions - thanks.
Re: Merging code from different developers
The Dialogue Save System works well with one of the databases, but it doesn't seem to save for both unfortunately. I also added a Save System prefab to scene 1 (set inactive by default), but this doesn't seem to make any difference. Hope you are able to spot the problem!
- Attachments
-
- updated2.zip
- (13.75 KiB) Downloaded 24 times
Re: Merging code from different developers
Hi,
Try this:
1. Remove the SaveSystem component from the EventSystem GameObject.
2. Choose A or B below:
A. It's easiest to keep the Dialogue Manager's Other Settings > Don't Destroy On Load ticked, especially if you're using Extra Databases. In this case:
Try this:
1. Remove the SaveSystem component from the EventSystem GameObject.
2. Choose A or B below:
A. It's easiest to keep the Dialogue Manager's Other Settings > Don't Destroy On Load ticked, especially if you're using Extra Databases. In this case:
- Tick Don't Destroy On Load
- Add a SaveSystem component to the Dialogue Manager.
- Remove the inactive SaveSystem GameObject.
- UNtick the Dialogue Manager's Don't Destroy On Load.
- UNtick the Dialogue Manager GameObject's InputDeviceManager component > Singleton.
- Do NOT add a SaveSystem component.
- Remove the JsonDataSerializer and PlayerPrefsSavedGameDataStorer.
- Set the SaveSystem GameObject active. Add JsonDataSerializer and PlayerPrefsSavedGameDataStorer.
- DialogueSystemController (when Don't Destroy On Load is ticked, which is the default value)
- InputDeviceManager (when Singleton is ticked, which is the default value)
- SaveSystem -- always since it needs to manage scene changes
Re: Merging code from different developers
I followed your advice but I still can't get it to work unfortunately. This example shows the problem more clearly - two quests are added in the first scene. Only one is present in the second, and then none are present in the third.
- Attachments
-
- updated3.zip
- (7.72 KiB) Downloaded 24 times
Re: Merging code from different developers
Some unnecessary options are ticked. Inspect your Dialogue Managers GameObjects' DialogueSystemSaver components. Untick Restore State On Start and Skip Apply Data After Frames If Apply Immediate.
Or tick the Dialogue Manager's Don't Destroy On Load checkbox.
Or tick the Dialogue Manager's Don't Destroy On Load checkbox.
Re: Merging code from different developers
Thanks - that fixed it!
Re: Merging code from different developers
Glad to help!