I have been trying to figure out whether I can use ES3.LoadInto to reference single GameObjects inside a saved GameObject array to their existing counterparts in the scene?
Basically I was trying to go with the usual persistent gameobject saving and loading approach and every time I kind of got lost along the way and thought of a simpler solution.
So I am currently running this:
Code: Select all
ES3.Save("events", GameObject.FindGameObjectsWithTag("Event"), mapFileName);
Code: Select all
GameObject[] eventarray;
eventarray = ES3.Load<GameObject[]>("events", mapFileName);
foreach(GameObject obj in eventarray)
{
//doesnt work obviously because I cant grab a single object from an array while loading
ES3.LoadInto<GameObject>("events", mapFileName, GameObject.Find(obj.name));
}
I'm pretty sure I got confused along the way and there is a much better solution than what I did but right now my brain won't cooperate.