- Home /
DOTS storing navmesh data in sharedComponent?
I am thinking about the best way of storing my navmesh data (hundreds of Vector3) and having it accessable inside parralel jobs.
Reading the documentation on ISharedComponentData, it looks perfect to me. The only thing that is bugging me right now is the part about changing values and creating new chunks. I mean I am sure that the data will never change! So is there any way to declare that?
Or does DOTS offer an even better solution to this?
Thanks a lot in advance and best wishes. Kim
Answer by andrew-lukasik · Jul 10, 2020 at 07:55 PM
I am thinking about the best way of storing my navmesh data and having it accessable inside parralel jobs.
NativeArray<T>
can be a field in ISharedComponentData
but SystemBase
too. BlobAsset (dedicated read-only memory block) can be referenced anywhere, even in IComponentData! (as BlobAssetReference; pointer of sorts).
Choose System
when dataset is singular to given World
, ISharedComponentData
when dataset needs to vary for chunks.
(hundreds of Vector3)
use 'float3'
I mean I am sure that the data will never change! So is there any way to declare that?
Yes. BlobAsset
Your answer
Follow this Question
Related Questions
How to raycast on multi core ECS 0 Answers
How to create a parallel for in Unity 4 Answers
What are these dots? 2 Answers