Can save/load within same "play" in editor but can't load after stopping then playing again

Discussion and help for Easy Save 3
Post Reply
Radicals
Posts: 8
Joined: Thu Jan 04, 2024 8:32 pm

Can save/load within same "play" in editor but can't load after stopping then playing again

Post by Radicals »

As the title says, I have keys for quick save and quick load. During one playthrough in editor they work wonderfully, I can save, change my characters items, then load, and the save is loaded correctly.

However if I stop the playthrough (by hitting the play button in editor I mean) then start again, and hit load, nothing is loaded.

No errors, no warnings, I get the console log of "loaded" that I put in so I know the method is being called.

The only thing in my scene I am saving is a player prefab and the items they are carrying in their inventory, and it has the Reference Manager script setup in the Player's scene.

I had a search through the forums and couldn't find this issue, any ideas?
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Can save/load within same "play" in editor but can't load after stopping then playing again

Post by Joel »

Hi there,

Unfortunately it's not possible to tell what is happening from what you've said. Usually this would indicate that you're loading references which have been generated at runtime so won't exist in other sessions, but you mention that you're not getting any warnings (I recommend double checking that warnings are enabled in the console).

Please could you create a new project with a simple scene which replicates this issue and send me a link to it on moodkie.com/contact along with step by step instructions.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Radicals
Posts: 8
Joined: Thu Jan 04, 2024 8:32 pm

Re: Can save/load within same "play" in editor but can't load after stopping then playing again

Post by Radicals »

This is very strange, but this morning it works?
The only thing I changed was I worked on my scene loader script, and then did a build for the first time in a while. Now the saving and loading is working correctly!

But the funny thing is *now* I get warnings in the console, even though it is working. I am betting Unity just needed a restart.

I get about 30 warnings of:

Code: Select all

Reference with ID 9156350634860576979 could not be found in Easy Save's reference manager. If you are loading objects dynamically (i.e. objects created at runtime), this warning is expected and can be ignored.
To disable warnings from Easy Save, go to Window > Easy Save 3 > Settings, and uncheck 'Log Warnings'
UnityEngine.Debug:LogWarningFormat (UnityEngine.Object,string,object[])
But it's fine, it's working, so I assume just ignore them?
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Can save/load within same "play" in editor but can't load after stopping then playing again

Post by Joel »

Hi there,

If you're correctly saving and loading objects dynamically then these warnings are expected, so I suspect this is the case for you.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply