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?
#Saving Native Container Data
1 messages · Page 1 of 1 (latest)
is it pure runtime data? save to a binary file
can it be baked beforehand? save your data in a blob
The things i need to save are:
GridCells (Strukts with Positions and Indexes)
CellNeighbors (Strukts with Neighbor Indexes)
Couple of ints
do they ever change at runtime?
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
But is that a good approach if i got multiple different grids containing there own data? (Can go up to multiple thousands od structs per grid)
as good as it gets. it depends more on your implementation than the approach.
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?
I'd really go with a blob asset before a scriptable object