Save and Load Prefab Instances using Auto Save

Examples which use the ES3AutoSave and ES3Prefab Components, which do not require code.
tbunreal
Posts: 4
Joined: Tue Jul 19, 2022 1:21 am

Re: Save and Load Prefab Instances using Auto Save

Post by tbunreal »

Hi, I followed the tutorial, works good. But how do I delete what I saved? I deleted the save file but objects continue to persist in my scene as if they are still saved.
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Save and Load Prefab Instances using Auto Save

Post by Joel »

Hi there,

To delete files in the project you can go to Tools > Easy Save 3 > Clear Persistent Data Path.

To programmatically delete files you would use the ES3.DeleteFile method.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
tbunreal
Posts: 4
Joined: Tue Jul 19, 2022 1:21 am

Re: Save and Load Prefab Instances using Auto Save

Post by tbunreal »

I've done that, but objects will still persist in my scene where they were saved. It seems the only way to get rid of them is to delete the auto save manager from my scene. Very weird
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Save and Load Prefab Instances using Auto Save

Post by Joel »

Hi there,

If you're encountering issues please could you private message me the basic project which replicates it.

Also just to check, have you changed any settings in the Easy Save or Auto Save settings window?

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
tbunreal
Posts: 4
Joined: Tue Jul 19, 2022 1:21 am

Re: Save and Load Prefab Instances using Auto Save

Post by tbunreal »

My game is almost complete, it would be too hard to turn it into a manageable project to send you. But let me go through the steps, if I'm not doing something wrong, I'll see what I can send you.

windows -> easy save -> enable auto save for this scene

change no settings

add es3 prefab script and es3 auto save script to a prefab that get instantiated at runtime into an object pool as a deactivated object

In the easy save windows under prefabs, my prefab has everything selected

Run game, activate prefab which is then placed on the ground

stop game

Delete save file, double checked in explorer it is gone, it is.

Run game, prefab is still in its saved spot

Stop game

delete manager from scene

run game

prefab is now gone
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Save and Load Prefab Instances using Auto Save

Post by Joel »

tbunreal wrote: Wed Jul 20, 2022 7:10 pm My game is almost complete, it would be too hard to turn it into a manageable project to send you. But let me go through the steps, if I'm not doing something wrong, I'll see what I can send you.

windows -> easy save -> enable auto save for this scene

change no settings

add es3 prefab script and es3 auto save script to a prefab that get instantiated at runtime into an object pool as a deactivated object

In the easy save windows under prefabs, my prefab has everything selected

Run game, activate prefab which is then placed on the ground

stop game

Delete save file, double checked in explorer it is gone, it is.

Run game, prefab is still in its saved spot

Stop game

delete manager from scene

run game

prefab is now gone
Hi there,

Are you manually adding the ES3Prefab and ES3 Auto Save script? If so, you should only interact with Auto Save via the Tools > Easy Save 3 > Auto Save window. However, I don't see how this would cause the behaviour you're experiencing.

If this isn't the issue, unfortunately I would need to see a basic project which replicates it as we've had no other reports of this.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
tbunreal
Posts: 4
Joined: Tue Jul 19, 2022 1:21 am

Re: Save and Load Prefab Instances using Auto Save

Post by tbunreal »

Well I have to right click the prefab and say enable easy save for prefabs no? Since they will get instantiated at runtime or sometime after. Then the scripts get added automatically to it, that's all I'm doing.
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Save and Load Prefab Instances using Auto Save

Post by Joel »

Hi there,

In that case I would need to see a basic project which replicates it, as we've not had any other reports of this and don't appear to be able to replicate this behaviour at my end.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
sebasrez
Posts: 12
Joined: Fri Mar 04, 2022 1:57 pm

Re: Save and Load Prefab Instances using Auto Save

Post by sebasrez »

Hi!
When I added auto save to a prefab, I just did the transform to test. It started spawning the same prefab in multiples each time I started and stopped the game (saved and loaded) to the point of crashing. What can I do to fix this? Thank you
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Save and Load Prefab Instances using Auto Save

Post by Joel »

sebasrez wrote: Wed Oct 12, 2022 3:58 pm Hi!
When I added auto save to a prefab, I just did the transform to test. It started spawning the same prefab in multiples each time I started and stopped the game (saved and loaded) to the point of crashing. What can I do to fix this? Thank you
Hi there, and thanks for getting in contact :)

I don't appear to be able to replicate this at my end. Please could you replicate this in a new project and private message it to me so I can see what is happening?

Also just to check, are you adding Auto Save to the prefab using the Auto Save window, or are you adding the Components to the GameObject yourself? You should never directly add the ES3AutoSave/ES3Prefab Component to a GameObject as it won't always be initialized correctly.

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