I'm storing a List<Transform> but when I load it back into my scene using ES2.LoadList<Transform>(myPath); it creates a bunch of objects in my scene view named "New Game Object" (1 for each Transform in my list). Each of the New Game Objects has the properties of the Transform that I'm loading. I'm just wondering if there's a way to delete them or not have them load into the scene since it seems like a waste to Instantiate and then Destroy them. I also don't seem to be able to even get reference to them because if I load my list into a variable, and then I do Destroy(myTransformList[0].gameObject) it doesn't even delete the object from the scene.
I know I could simply store a different data type such as the Vector Position and the Vector Rotation but I'm curious because it seems like with ES2.LoadList() there's no way to avoid having these ghost Transform nodes show up in the heirarchy. A bug perhaps?
Cheers & Thanks!
Justin
Here is my code for your reference:
Code: Select all
List<Transform> myListOfTransforms = new List<Transform>();
void Save(){
ES2.Save(myListOfTransforms, transformListSavePath);
}
void Load(){
myListOfTransforms = ES2.LoadList<Transform>(transformListSavePath);
//at this point in the code is where the ghost "New Game Object" appears in the scene.
}