Saving runtime objects and general advice
Posted: Thu Nov 10, 2016 5:59 pm
Hello,
I am pretty new to the whole "enterprise" of saving and loading a game with Unity. My expectation was that I could simply click a button, and Easy Save 2 would save all of my scene game objects to a file, and then I could click another button and have them loaded -- and be done. Obviously, this is not the case (at least I think).
What is kind of the general practice way of saving a Unity scene? For example, do I need to place "save code" on all of my game objects and then when the player presses a button to save a game, I have to iterate through all of the objects to save that game object or component? Why is the "GameObject" type NOT supported? It sounds like I have to instantiate a pre-made prefab, then load all of the objects components individually (in addition to the transform) -- is that actually what needs to happen?
I am also using the UMA system from Unity (Unity multi-purpose avatars), and they are objects that are completely created at runtime, which means I have no prefab for them. If I don't have a prefab for these UMA characters, is there a way for me to be able to save and load them?
I know some of this is hard to answer due to the nature of saving and loading and how each person's game is different, but I'm trying to wrap my head around how to save and load with this system.
Thank you for your time and any advice you can give.
I am pretty new to the whole "enterprise" of saving and loading a game with Unity. My expectation was that I could simply click a button, and Easy Save 2 would save all of my scene game objects to a file, and then I could click another button and have them loaded -- and be done. Obviously, this is not the case (at least I think).
What is kind of the general practice way of saving a Unity scene? For example, do I need to place "save code" on all of my game objects and then when the player presses a button to save a game, I have to iterate through all of the objects to save that game object or component? Why is the "GameObject" type NOT supported? It sounds like I have to instantiate a pre-made prefab, then load all of the objects components individually (in addition to the transform) -- is that actually what needs to happen?
I am also using the UMA system from Unity (Unity multi-purpose avatars), and they are objects that are completely created at runtime, which means I have no prefab for them. If I don't have a prefab for these UMA characters, is there a way for me to be able to save and load them?
I know some of this is hard to answer due to the nature of saving and loading and how each person's game is different, but I'm trying to wrap my head around how to save and load with this system.
Thank you for your time and any advice you can give.