I have a "Play" button on the main menu. Most times it will load my save file. But occasionally it won't leading to a save file loss, unless I do a reset. Restarting the game does not work.
I have a button (img '1 button') that triggers OnUse dialogue trigger (img '2 trigger') as in the screenshots below. The trigger enables this "LOAD" gameobject (img '3 load').
Any clue what could cause the save file to not be loaded sometimes? Is it a corrupt save file?
Save file not loading
Save file not loading
- Attachments
-
- 3 load.png (41.62 KiB) Viewed 437 times
-
- 2 trigger.png (40.77 KiB) Viewed 437 times
-
- 1 button.png (20.9 KiB) Viewed 437 times
Re: Save file not loading
Hi,
I'm not quite sure what's going on there, but it looks like you're going through these steps to do a fade when loading a save file.
What about using the save system's built-in fade transition instead? The easiest way to do this is to download and import the Save System Prefabs from the Dialogue System Extras page. Then:
1. Drop the Save System prefab into your scene (e.g., main menu scene).
2. Add the Loading Screen scene to your build settings. You can customize its appearance later.
3. Remove the Save System components (SaveSystem, DataSerializer, SavedGameDataStorer) from whatever other GameObject it's on (typically the Dialogue Manager).
If you don't want to use the prefabs, you can add a StandardSceneTransitionManager component to the GameObject that has the SaveSystem component. Add the SceneFaderCanvas prefab as a child. Assign the SceneFaderCanvas instance to the StandardSceneTransitionManager's Leave and Enter Scene Transition sections. Set the Leave section's Trigger to "Show" and durations to 1 and 1. Set the Enter section's Trigger to "Hide" and leave the durations at 0.
Then just call SaveSystemMethods.LoadOrRestart without having to use all those sequencer commands and Dialogue System Triggers.
I'm not quite sure what's going on there, but it looks like you're going through these steps to do a fade when loading a save file.
What about using the save system's built-in fade transition instead? The easiest way to do this is to download and import the Save System Prefabs from the Dialogue System Extras page. Then:
1. Drop the Save System prefab into your scene (e.g., main menu scene).
2. Add the Loading Screen scene to your build settings. You can customize its appearance later.
3. Remove the Save System components (SaveSystem, DataSerializer, SavedGameDataStorer) from whatever other GameObject it's on (typically the Dialogue Manager).
If you don't want to use the prefabs, you can add a StandardSceneTransitionManager component to the GameObject that has the SaveSystem component. Add the SceneFaderCanvas prefab as a child. Assign the SceneFaderCanvas instance to the StandardSceneTransitionManager's Leave and Enter Scene Transition sections. Set the Leave section's Trigger to "Show" and durations to 1 and 1. Set the Enter section's Trigger to "Hide" and leave the durations at 0.
Then just call SaveSystemMethods.LoadOrRestart without having to use all those sequencer commands and Dialogue System Triggers.
Re: Save file not loading
I kept the fade on the dialogue trigger, but added LoadOnRestart on button click to place it directly at the source. Is this likely to fix it?
Re: Save file not loading
Hi,
You might not always get the visual effect you're waiting for, but from what you describe it should fix the save/load issue. This is because the fade will happen in parallel with the scene load. If you use a Standard Scene Transition Manager, it will fade first and then load the scene.
You might not always get the visual effect you're waiting for, but from what you describe it should fix the save/load issue. This is because the fade will happen in parallel with the scene load. If you use a Standard Scene Transition Manager, it will fade first and then load the scene.