Hangs on Load

Discussion and help for Easy Save 3
User avatar
Joel
Moodkie Staff
Posts: 4848
Joined: Wed Nov 07, 2012 10:32 pm

Re: Hangs on Load

Post by Joel »

Hi there,

Saving and loading GameObjects relies on the manager because otherwise it's impossible to resolve references.

To save the children you can simply put all of the children into an array and save this. Something along the lines of:
var children = new List<GameObject>();
foreach(Transform child in transform)
    children.Add(child.gameObject);
ES3.Save<GameObject>("myKey", children);
And then to load:

ES3.Load<GameObject>("myKey");

Note that if the children are instantiated at runtime, you will need to follow the "Saving and loading prefab instances" instructions 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
Post Reply