Hi, I'm currently trying to wrap my head around DOTS & ECS.
I'm prototyping a tower defense game so I've got lots of entities that will share the same data (waypoints along a path from their spawn point all the way to the "exit"). I've tried making use of ISharedComponentData to store the waypoint positions (as a list of float3) but I couldn't manage (having a float3[] inside a ISharedComponentData didn't sit right for some reasons). Many paths can exist so all entities might not follow the same path.
So I've just encountered BlobAsset and they seem to be one of the right tools to use in this case but I'm wondering about how to actually use them, should I:
- Store a
BlobAssetReference(in aISharedComponentData) that's created at bake time and Unity will figure that a lot of other entities share the same content hence use the same pointer thanks to someBlobAssetStoremagic ? - Store a
BlobAssetReference(in aISharedComponentData) from a map ofBlobAssetReference(oneBlobAssetReferencefor each waypoint array that represents a path) that's created atGameObjectConversiontime ? - Do something else that's more idiomatic of
BlobAssetand DOTS ?