Keep GameObjects After Re Run?
Hi folks ! I have a trouble about GameObjects.
I wanna create gameobjects -or pool them, whatever- with user choices. And save them (or something else). (maybe DontDestroyOnLoad works for this ???)
And exit.
After game runs again, saved(?) GameObjects have to be there. (Like messaging applications.)
Save them and recreate them after run ??? Or any other solution? I know that creating GameObjects is expensive for performance. (I aim mobile platforms.) And i can say that my game has a lot of GameObjects.
How can i achieve this? Thank you.
Answer by Firedan1176 · Feb 09, 2016 at 08:04 PM
The most relevant source would be PlayerPrefs, but you can only save ints, floats, etc. If you want, to could save the information about the transform position, the variables on the scripts of the object, but as far as I know, you cannot save the actual GameObject. I may be wrong.
Thanks for your answer. I know PlayerPrefs. And i know that i can serialize items. But i think this doesnt solve our problem.
Your answer
Follow this Question
Related Questions
If you want to destroy the game object, please call 'Destroy' on the game object instead. 1 Answer
Destroying object multiple times. 0 Answers
Make an object move from Point A to Point B then back to Point A, and then destroy itself 1 Answer
Keep GameObject destroyed on returning to the scene 1 Answer
How to destroy child of GameObject? 1 Answer