Hi there!
I have a scriptable object that contains a lot of properties (some lists that grow), and that I have saved.
Later, I wish to modify and save just one property in this big scriptable object. Is there a way to just update that one property and save, or do I have to save the entire scriptable object again?
I'm concerned that as this scriptable object grows, the save time will start to increase. So I would rather just update and save the single property that needs changing rather than entire object. Is this possible with ES3?
Likewise, if I wanted to just save 2 or 3 properties, is this also possible?
Cheers!
Saving one property in scriptable object.
Re: Saving one property in scriptable object.
Hi there,
You would need to save the entire ScriptableObject again, or instead of saving the ScriptableObject, save it's fields separately.
Note that generally a ScriptableObject with loads of fields isn't going to be particularly intensive to save unless the fields themselves are complex types (i.e. Meshes, Textures). If the ScriptableObject only contains basic types such as primitive types, Vectors, Quaternions, etc, it shouldn't have any issue dealing with hundreds of these (at which point you'd probably want to consider breaking your ScriptableObject down into multiple ScriptableObjects for maintainability anyway).
All the best,
Joel
You would need to save the entire ScriptableObject again, or instead of saving the ScriptableObject, save it's fields separately.
Note that generally a ScriptableObject with loads of fields isn't going to be particularly intensive to save unless the fields themselves are complex types (i.e. Meshes, Textures). If the ScriptableObject only contains basic types such as primitive types, Vectors, Quaternions, etc, it shouldn't have any issue dealing with hundreds of these (at which point you'd probably want to consider breaking your ScriptableObject down into multiple ScriptableObjects for maintainability anyway).
All the best,
Joel
Re: Saving one property in scriptable object.
Thanks for clearing this up! Much appreciated.
Does the size of the of .es3 save file contribute to the save time?
For example, if I save just a single int under a given key, would the save time to file be longer if the file size of the .es3 is bigger?
Does the size of the of .es3 save file contribute to the save time?
For example, if I save just a single int under a given key, would the save time to file be longer if the file size of the .es3 is bigger?
Re: Saving one property in scriptable object.
Number of keys is usually a much bigger factor than file size, but in both cases you can follow the Improving Performance guide to improve this significantly:
https://docs.moodkie.com/easy-save-3/es ... rformance/
All the best,
Joel
https://docs.moodkie.com/easy-save-3/es ... rformance/
All the best,
Joel