#Saving Native Container Data

1 messages · Page 1 of 1 (latest)

earnest hawk
#

Hey There,
Im currently making a Pathfinding system with the unity jobs system, and im currently optimizing my code heavily. Now i thought about "baking" my grids, so they dont have to get generated in runtime. But when i hit play and stop playmode again, all the data is gone, is there a good way to store lots of Native Container data of multiple grids?

wide spindle
#

is it pure runtime data? save to a binary file
can it be baked beforehand? save your data in a blob

earnest hawk
wide spindle
#

do they ever change at runtime?

earnest hawk
#

No, its supposed to be a tool, Developers can change the grid to how the like it and then they can generate the whole grid structure inside the editor.

#

And in the end it should be used inside a game

earnest hawk
wide spindle
#

as good as it gets. it depends more on your implementation than the approach.

earnest hawk
#

Isnt it possible to store the data inside a scriptable object? So lets say when you click bake, all the data gets filled inside a Scriptable object, and in OnEnable OnDisable the data gets loaded/unloaded?

iron niche
#

I'd really go with a blob asset before a scriptable object