ES3 Autosave: GameObject active/not + prefab

Discussion and help for Easy Save 3
Post Reply
Bloxfan
Posts: 8
Joined: Tue May 01, 2018 2:47 pm

ES3 Autosave: GameObject active/not + prefab

Post by Bloxfan »

Hi guys,

Just started using EasySave 3. Love the autosave feature! Have been looking for an easy way to implement a save/load system in my game.
2 Questions please:

1/ Is it possible for autosave to remember if GameObject is enable or not?

2/ Autosave doesnt seem to work with prefab (I did enable the autosave for prefab). Variables were not saved
- I noticed that the reference no. in the gameobject and in the reference list in easy save manager are different
- When loading, another prefab will be instantiate although there's already one existing
- Saving&loading a prefab possible with the save/load event right?

- After more testing, it seems that prefab + autosave works, but if prefab object already in Unity hierarchy. Maybe problem comes if prefab is instantiate?

Thanks in advance!
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: ES3 Autosave: GameObject active/not + prefab

Post by Joel »

Hi there,

Saving the active status of the GameObject needs to be handled separately. However, I've attached a script below which can track this for a GameObject.

With regards to your other issue, it's not possible for me to understand what is happening from what you've described. Please could you PM me a very basic project which replicates the issue, and instructions to replicate it, so I can see what is happening at my end?

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Bloxfan
Posts: 8
Joined: Tue May 01, 2018 2:47 pm

Re: ES3 Autosave: GameObject active/not + prefab

Post by Bloxfan »

Hi Joe,

Thanks for the fast reply!

Sorry, my explanation was not very clear. I have sent you a PM.

- I have a prefab "Cube", with ES3 autosave script & ES3 prefab script attached + variable called HP

- In the project I sent you, you will have 2 cubes when play in Unity editor
- Trying to save/load HP variable
- "Cube A" already in Unity hierachy, autosave works
- "Cube B" I instantiate the prefab through code, autosave wont work

Hope its clearer :)

Ps:
- Im not sure I understand what ES3 prefab script is for? Even without it, autosave does work. The script just seems to duplicate my prefab
- I dont see the script you sent me
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: ES3 Autosave: GameObject active/not + prefab

Post by Joel »

Hi there,

There appears to be a bug at Unity's end, as I've removed the ES3Prefab component from your scene object, but calling GetComponent<ES3Prefab> on the object still returns an instance of the script. And trying to break the prefab instance still maintains a link to the prefab, so there's definitely something strange going on at their end. Even deleting the ES3AutoSave component still registers that there's an ES3AutoSave component attached to it, even though there's not.

Would you be able to send me a project which doesn't use any other middleware so I can check that it's indeed an issue caused by Unity? Also would you be able to let me know where you're instantiating the prefab, as I don't appear to be able to find where this is happening.

Many thanks,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Bloxfan
Posts: 8
Joined: Tue May 01, 2018 2:47 pm

Re: ES3 Autosave: GameObject active/not + prefab

Post by Bloxfan »

Hi Joe,

Also would you be able to let me know where you're instantiating the prefab, as I don't appear to be able to find where this is happening.
-> Im using a visual scripting asset called Blox. In the hierachy theres a GameObject called Run script with a component called Blox container (if you double click it you will have the visual scripting editor)

Would you be able to send me a project which doesn't use any other middleware so I can check that it's indeed an issue caused by Unity?
->Just PM, only asset imported is ES. Sorry, I dont know how to code (thats why Im using blox). Could you help to instantiate the prefab in the project?

Thanks in advance!
Post Reply