- Home /
save/load cloned game object
i've googled a lot but no good answers , i'm trying to save cloned object with position in the scene then load it next time (like strategy games).
hope someone can help me ,sorry with my english .
Comment
Answer by YoungDeveloper · Sep 28, 2013 at 09:14 AM
Then either you don't know how to google or else it's even worse (won't say that word), but anyway :).
To save the cloned object on Instantiate (C#):
GameObject savedObject; //Store newly created gameobject
savedObject = (GameObject)Instantiate(objectToSpawn, spawnPosition, objectRotation);
I think he means create an instance, save it so that the next time you play the game then it's still there....
you are right Whydoidoit anyway does your asset support this ?
I want to know this too. I wan't to make a building game, but I am not sure how to make it save