Page 1 of 2

Save a gamemanager

Posted: Sat Apr 17, 2021 11:48 am
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

Re: Save a gamemanager

Posted: Sat Apr 17, 2021 12:02 pm
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

Re: Save a gamemanager

Posted: Sat Apr 17, 2021 12:21 pm
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?

Re: Save a gamemanager

Posted: Sat Apr 17, 2021 1:02 pm
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

Re: Save a gamemanager

Posted: Sat Apr 17, 2021 1:02 pm
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

Re: Save a gamemanager

Posted: Sat Apr 17, 2021 1:03 pm
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

Re: Save a gamemanager

Posted: Sat Apr 17, 2021 1:57 pm
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

Re: Save a gamemanager

Posted: Sat Apr 17, 2021 2:00 pm
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"

Re: Save a gamemanager

Posted: Sat Apr 17, 2021 2:08 pm
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

Re: Save a gamemanager

Posted: Sat Apr 17, 2021 2:09 pm
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