Page 1 of 2

Saving a whole scene Question

Posted: Wed Jan 20, 2021 4:06 pm
by BTippen
So I am trying to save a whole scene. I have hundreds of GameObjects under one parent. Is there a way I can save the parent and include all the children and their positions in the scene? I am aware I can try and loop through each possible GameObject and save its position but looking for a short cut.

Re: Saving a whole scene Question

Posted: Wed Jan 20, 2021 4:15 pm
by BTippen
Surely if I am saving a GameObject it will save its position as well?

Re: Saving a whole scene Question

Posted: Wed Jan 20, 2021 4:21 pm
by Joel
Hi there,

You can save the entire GameObject with Save GameObject children enabled in settings, but be aware that this will save the entire hierarchy which could be performance intensive for so many GameObjects.

All the best,
Joel

Re: Saving a whole scene Question

Posted: Wed Jan 20, 2021 5:25 pm
by BTippen
Joel wrote: Wed Jan 20, 2021 4:21 pm Hi there,

You can save the entire GameObject with Save GameObject children enabled in settings, but be aware that this will save the entire hierarchy which could be performance intensive for so many GameObjects.

All the best,
Joel
Can this be done in code?

Re: Saving a whole scene Question

Posted: Wed Jan 20, 2021 5:40 pm
by Joel
Hi there,

This is covered in the Saving and Loading GameObjects guide:
https://docs.moodkie.com/easy-save-3/es ... s-prefabs/

All the best,
Joel

Re: Saving a whole scene Question

Posted: Thu Jan 21, 2021 11:41 am
by BTippen
Joel wrote: Wed Jan 20, 2021 5:40 pm Hi there,

This is covered in the Saving and Loading GameObjects guide:
https://docs.moodkie.com/easy-save-3/es ... s-prefabs/

All the best,
Joel
I had read them. Thank you for this help Joel I really appreciate it. When I save GameOBjects like this and reload them in some of the components are missing like the scripts and the colliders. What do I have to do to make sure they are saved as well? Is there some thig I am missing?

Re: Saving a whole scene Question

Posted: Thu Jan 21, 2021 12:30 pm
by Joel
Hi there,

Did you see this is in the guide:
This will save and load the following:

- layer, tag, name and hideFlags.
- Components on the Natively-supported types list, or those which have been manually supported using an ES3Type.
- All of the above for every child of the GameObject.
You can see what types are natively supported, and how to manually add support, in the Supported Types guide:
https://docs.moodkie.com/easy-save-3/es ... ted-types/

All the best,
Joel

Re: Saving a whole scene Question

Posted: Thu Jan 21, 2021 1:52 pm
by BTippen
Yes but I have added the [ES3Serializable] to the Scripts but the components are still not saving.

Also why is CircleCollider2D not included in the components saved.

Re: Saving a whole scene Question

Posted: Thu Jan 21, 2021 2:20 pm
by Joel
Hi there,

Sorry, I think you may have read the text I quoted incorrectly. You need to create an ES3Type for it to be serialised. I've linked the specific information on this here.

All the best,
Joel

Re: Saving a whole scene Question

Posted: Thu Jan 21, 2021 2:31 pm
by BTippen
Yes that worked!!!!

Thank you so much Joel. Great Support!