Save a gamemanager

Discussion and help for Easy Save 3
zay_altick
Posts: 16
Joined: Sat Apr 17, 2021 11:42 am

Save a gamemanager

Post by zay_altick »

Hey! Just got Easy Save and want to start using it right away!

I have a Game Object that's meant to last forever in the game after loading it up around the first level(Which is about scene 3 in my game).

How would I bee able to implement easy save so it saves that specific gameObject and loads it up when I start the game up again
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Save a gamemanager

Post by Joel »

Hi there,

You can find information on using Easy Save in the Getting Started guide:
https://docs.moodkie.com/easy-save-3/getting-started/

And information specific to GameObjects here:
https://docs.moodkie.com/easy-save-3/es ... s-prefabs/

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
zay_altick
Posts: 16
Joined: Sat Apr 17, 2021 11:42 am

Re: Save a gamemanager

Post by zay_altick »

Hey! Thanks for your message!

I'm taking a look at the docs, but am a bit confused as to how I can load up a gameobject that isn't there at the time.

To bring a bit more context:

Once the gameobject is opened up for the VEERY first time in the game, it should forever exist now.
So at that point, that gameobject should ALWAYS be loading itself up in the main menu with the saved parts of it.
Thought it'd be worth mentioning I'm also trying to use "AutoSave" as well.

I tried downloading the "Save and Load Prefab Instantiate" example to try it out, but when I exit play mode, nothing is saved in the scene. Do you know why that is?
zay_altick
Posts: 16
Joined: Sat Apr 17, 2021 11:42 am

Re: Save a gamemanager

Post by zay_altick »

*Update*

After playing around, I think this is the issue:

Code: Select all

UnauthorizedAccessException: Access to the path "/SaveFile.es3.tmp" is denied.
ES3Internal.ES3Stream.CreateStream (ES3Settings settings, ES3Internal.ES3FileMode fileMode) (at Assets/Plugins/Easy Save 3/Scripts/Streams/ES3Stream.cs:65)
I keep getting this error and I'm unsure as to why. I haven't changed any of the "tools" settings or even directory name
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Save a gamemanager

Post by Joel »

Hi there,

If the GameObject doesn't exist then Easy Save will create it when you call the ES3.Load method. Alternatively if you're instantiating a prefab you can follow the instructions in the 'Saving prefab instances' section of the GameObject guide I linked in my previous post.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Save a gamemanager

Post by Joel »

zay_altick wrote: Sat Apr 17, 2021 1:02 pm *Update*

After playing around, I think this is the issue:

Code: Select all

UnauthorizedAccessException: Access to the path "/SaveFile.es3.tmp" is denied.
ES3Internal.ES3Stream.CreateStream (ES3Settings settings, ES3Internal.ES3FileMode fileMode) (at Assets/Plugins/Easy Save 3/Scripts/Streams/ES3Stream.cs:65)
I keep getting this error and I'm unsure as to why. I haven't changed any of the "tools" settings or even directory name
Please could you replicate this in a new project and private message it to me?

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
zay_altick
Posts: 16
Joined: Sat Apr 17, 2021 11:42 am

Re: Save a gamemanager

Post by zay_altick »

I opened up a new project and it seemed to work fine. I then opened up my current project and again, it works fine. I'm not sure why that happened tbh. The error is completely gone
zay_altick
Posts: 16
Joined: Sat Apr 17, 2021 11:42 am

Re: Save a gamemanager

Post by zay_altick »

If the GameObject doesn't exist then Easy Save will create it when you call the ES3.Load method. Alternatively if you're instantiating a prefab you can follow the instructions in the 'Saving prefab instances' section of the GameObject guide I linked in my previous post.
Oh so I actually need to call "Load" via a script in order to actually get the data that was saved? I thought I didn't have to since "AutoSave" had the "Load Event" feature that was set to "Awake"
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Save a gamemanager

Post by Joel »

zay_altick wrote: Sat Apr 17, 2021 2:00 pm
If the GameObject doesn't exist then Easy Save will create it when you call the ES3.Load method. Alternatively if you're instantiating a prefab you can follow the instructions in the 'Saving prefab instances' section of the GameObject guide I linked in my previous post.
Oh so I actually need to call "Load" via a script in order to actually get the data that was saved? I thought I didn't have to since "AutoSave" had the "Load Event" feature that was set to "Awake"
If you are using Auto Save then you don't need to call Load, this will be automatically called for you.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
zay_altick
Posts: 16
Joined: Sat Apr 17, 2021 11:42 am

Re: Save a gamemanager

Post by zay_altick »

Thanks! Just noticed that. Sorry, that first glitch seemed to really mess with me causing confusion haha
It looks like the GameObject I wanted to have saved is working, but it's creating multiple instances of it every time the project replays. A bit strange since I thought it wouldn't do that if there's already one in the scene
Post Reply