Quickest Save Method
Quickest Save Method
I want to save everything in scenes with mininmal effort. What would be the most efficient way while not compromising security? Are there any reasons why I should not just get all the objects in the active scene and save them in a loop, not using keys and values but just storing the whole gameobject and its components?
Re: Quickest Save Method
Hi there, and thanks for getting in contact.
I wouldn't recommend doing this for anything other than very simple scenes as saving an entire scene would have a major impact on performance. You may be able to improve this slightly with the Improving Performance guide, but saving a large amount of data will be unavoidably slow and bottlenecked by your system rather than by code.
There's also no guarantee that everything in your scene is serializable at runtime. I recommend taking a look at the Saving and Loading GameObjects and Supported Types guides for information on what Components/Fields/Properties would be serializable.
https://docs.moodkie.com/easy-save-3/es ... s-prefabs/
https://docs.moodkie.com/easy-save-3/es ... ted-types/
Security generally isn't an issue because only explicitly supported Components are saved on GameObjects.
All the best,
Joel
I wouldn't recommend doing this for anything other than very simple scenes as saving an entire scene would have a major impact on performance. You may be able to improve this slightly with the Improving Performance guide, but saving a large amount of data will be unavoidably slow and bottlenecked by your system rather than by code.
There's also no guarantee that everything in your scene is serializable at runtime. I recommend taking a look at the Saving and Loading GameObjects and Supported Types guides for information on what Components/Fields/Properties would be serializable.
https://docs.moodkie.com/easy-save-3/es ... s-prefabs/
https://docs.moodkie.com/easy-save-3/es ... ted-types/
Security generally isn't an issue because only explicitly supported Components are saved on GameObjects.
All the best,
Joel