It’s time to announce Saving system for DOTS in an official way. (It’s also on sale right now )
Historically I was already using it in my own project for a while (for NZSpellCasting) and as that asset grew bigger and bigger, I figured I need to make a split. I already had very specific requirements (mainly UnsafeLists and custom serializer/deserializer) and I then spent nearly 2 months to add a well structured editor UI, source generators and polish as much as possible to make the tedious process of saving data as easy as possible. Big shout here to @thelebaron who was brave enough to make the first dive and helped me find a few nasty bugs and requested some great UI features.
Saving data is a very peculiar thing and I was hesitant to even release the asset at all. As time has passed from the initial release I’m confident in its quality and that this asset can help others save a lot of time and not be forced to roll your own system.
To make this post longer and more informative about the asset itself, a copy/paste from the asset store page. So here goes
Saving system for DOTS enables you to easily save and load all your unmanaged data with an UI driven workflow.
How?
Create a scriptable object Save Format and add the types you want to save in a handcrafted UI and let the source code generator do the heavy lifting for optimized serialize and deserialization code.
Then mark subscene entities or prefabs with a Savable Authoring component and you are done. Saved data will be efficiently laid out in a binary format and compressed with LZ4.
Features
Create save formats in the editor UI
Save and load data defined in save formats
Automatically keep track of subscenes
Ignore fields in structs
Create migration plans with an intuitive node based approach when the save format has changed
Prefab migration when prefabs have changed
Included Savegame viewer for easy debugging
Full Source code included
Links: Documentation | Discord | E-Mail
Automatically keep track of subscenes
- Automatically load previously open subscenes
- Instantiated prefabs (from spawners, etc…)
- Destroyed objects (trees, iron nodes, etc…)
Save and load data defined in save formats
- global (non-subscene) and subscene entity data
- Entity struct data with IComponentData
- Entity buffers with IBufferElementData
- Component enabled states with IEnableableComponentData
- Arbitrary primitive struct data
- Nested support for UnsafeList
- Custom serializer/deserializer for more complex tasks