I have followed the instructions at this URL on how to configure and setup the ability to save the variable and quest states.
http://www.pixelcrushers.com/dialogue_s ... ystemSetup
I'm not doing any custom scripting at this point. I'm just using the standard components that came with the Dialogue System for Unity.
The issue I'm facing is that when I start my game and make changes to some of the game settings... if I exit the game and restart the changes I made will be loaded as expected. If I exit again and start my game a third time... all the variable values will be reset to their defaults. This happens consistently when I perform this sequence using the unity editor or while running the game post build and install.
I have included an attachment which lists the components I have added based on following the instructions.
Any idea why my saved game settings get reset to their default values when running my game the third time?
Thanks - Jeff
Strange issue with Save System
Strange issue with Save System
- Attachments
-
- components.png (52.53 KiB) Viewed 595 times
Re: Strange issue with Save System
Hi,
What is the Game Saver component? (If it's the one included with the Dialogue System, you can remove it.)
What is the Auto Save System component? That's not a Dialogue System component. Could it be interfering?
Please use only one SavedGameDataStorer. Remove either Disk Saved Game Data Storer or PlayerPrefs Saved Game Data Storer. This could also be causing an issue if the Save System uses one SavedGameDataStorer in one run of the game and happens to use the other one in another run of the game. For now, I recommend removing the Disk Saved Game Data Storer and leaving the PlayerPrefs Saved Game Data Storer in place.
You can also remove the Save System Methods component unless you're using it for something. Typically you'll only add this to other GameObjects that don't have the Save System component -- such as a "Load Game" UI button so that you can call SaveSystemMethods.LoadFromSlot.
It may help to temporarily tick the Debug checkboxes on the Save System, PlayerPrefs Saved Game Data Storer, and Dialogue System Saver components if they're available to tick. (Depending on your version, the Dialogue System Saver may not have a Debug checkbox.) This will log save system activity to the Console, which may help you identify the issue.
I recommend looking at the setup of the Dialogue Manager in the Dialogue System's DemoScene1.
What is the Game Saver component? (If it's the one included with the Dialogue System, you can remove it.)
What is the Auto Save System component? That's not a Dialogue System component. Could it be interfering?
Please use only one SavedGameDataStorer. Remove either Disk Saved Game Data Storer or PlayerPrefs Saved Game Data Storer. This could also be causing an issue if the Save System uses one SavedGameDataStorer in one run of the game and happens to use the other one in another run of the game. For now, I recommend removing the Disk Saved Game Data Storer and leaving the PlayerPrefs Saved Game Data Storer in place.
You can also remove the Save System Methods component unless you're using it for something. Typically you'll only add this to other GameObjects that don't have the Save System component -- such as a "Load Game" UI button so that you can call SaveSystemMethods.LoadFromSlot.
It may help to temporarily tick the Debug checkboxes on the Save System, PlayerPrefs Saved Game Data Storer, and Dialogue System Saver components if they're available to tick. (Depending on your version, the Dialogue System Saver may not have a Debug checkbox.) This will log save system activity to the Console, which may help you identify the issue.
I recommend looking at the setup of the Dialogue Manager in the Dialogue System's DemoScene1.
Re: Strange issue with Save System
Hi Tony,
I'm still here... I just got busy this past week. I'll try your suggestions and let you know.
I just have to say your product is amazing and has been extremely valuable in my project. I use the DialogSystemTrigger a lot! It really speeds up development and the ability to quickly trigger other actions without a bunch of coding!
Thank you!
Jeff
I'm still here... I just got busy this past week. I'll try your suggestions and let you know.
I just have to say your product is amazing and has been extremely valuable in my project. I use the DialogSystemTrigger a lot! It really speeds up development and the ability to quickly trigger other actions without a bunch of coding!
Thank you!
Jeff
Last edited by orbjeff on Tue Sep 14, 2021 10:53 pm, edited 1 time in total.
Re: Strange issue with Save System
Hi Jeff,
Thanks; that's great to hear.
When you get a chance to check out those save system items, I'll be here if you have any questions.
Thanks; that's great to hear.
When you get a chance to check out those save system items, I'll be here if you have any questions.
Re: Strange issue with Save System
Hi Tony,
I think this is now resolved. I made the changes you suggested and found a few lines of code that needed to be removed from one of my scripts. Everything seems to be saving correctly now. I'll continue testing over the next few days. If I do a clean install of the game it seems to retain my previous install's settings. I'm curious where the player preferences data is actually saved?
Thanks,
Jeff
I think this is now resolved. I made the changes you suggested and found a few lines of code that needed to be removed from one of my scripts. Everything seems to be saving correctly now. I'll continue testing over the next few days. If I do a clean install of the game it seems to retain my previous install's settings. I'm curious where the player preferences data is actually saved?
Thanks,
Jeff
Re: Strange issue with Save System
Hi Jeff,
If you're talking about PlayerPrefs, it's stored in different locations on different platforms. (See here.)
Note that the save system doesn't require you to use PlayerPrefs. However, it's a simple, convenient way to get the save system working on basically all platforms. If you decide you want to switch to a different save location later -- for example, saving to local disk files -- you only need to remove the PlayerPrefsSavedGameDataStorer and add another saved game data storer such as DiskSavedGameDataStorer in its place.
If you're talking about PlayerPrefs, it's stored in different locations on different platforms. (See here.)
Note that the save system doesn't require you to use PlayerPrefs. However, it's a simple, convenient way to get the save system working on basically all platforms. If you decide you want to switch to a different save location later -- for example, saving to local disk files -- you only need to remove the PlayerPrefsSavedGameDataStorer and add another saved game data storer such as DiskSavedGameDataStorer in its place.