How to build out without build keeping saves?

Discussion and help for Easy Save 3
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: How to build out without build keeping saves?

Post by Joel »

poptarts4444 wrote: Tue Mar 19, 2024 2:19 pm
Joel wrote: Tue Mar 19, 2024 8:24 am I'm not sure what you mean by "clear the SO data", could you clarify?

If you mean just clear the data you've saved regarding ScriptableObjects you can use ES3.DeleteKey to delete individual keys if you've saved your SO data to a separate key.

All the best,
Joel
yeah sorry it's kind of hard to describe. So let's say I have an SO called DataSO that holds a float value. When loading a save I will fill in that float with the loaded float. If I'm playtesting my game in the editor, then values will be in those SOs in the editor. So that DataSO will have some float assigned.

If I build at that point, then that DataSO will still have that data in it. If the build already has a save, then it's no issue since it will just overwrite the float. If this is the first time the build is running though, then the SO won't get overwritten and the game will start with that float filled in. Does that make sense?

Basically, now I set up a script that resets all SOs that I've saving/loading before making a new build, but I go and manually run it. That way they are "blank" for a new build save. I guess I'm a little surprised that people don't run into this often since I'm not sure how else to go about it if I'm using SOs.
Generally in this case people work with an instance of the SO rather than the SO itself, so that changes made don't affect the SO in your Assets folder.
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
poptarts4444
Posts: 18
Joined: Sat Jul 15, 2023 2:58 am

Re: How to build out without build keeping saves?

Post by poptarts4444 »

i figured out a very easy solution. thanks everyone. just came out down to resetting my SOs before anything is loaded/saved in the buid.
Post Reply