Quickest Save Method

Discussion and help for Easy Save 3
Post Reply
RoadSpell
Posts: 1
Joined: Thu Mar 02, 2023 9:43 am

Quickest Save Method

Post by RoadSpell »

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?
User avatar
Joel
Moodkie Staff
Posts: 4848
Joined: Wed Nov 07, 2012 10:32 pm

Re: Quickest Save Method

Post by Joel »

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
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply