I want to create a System that holds reference to a dynamic (more like configurable for the baking process) number of NativeArrays.
Imagine n-instances of NativeArrays. My System will spawn x-number of jobs that each take in two of those NativeArrays - looping over one of the Arrays for the actual Job.
Example:
var na1 = new NativeArray<float3>(count1, Allocator.Persistent);
var na2 = new NativeArray<float3>(count2, Allocator.Persistent);
...
var nan = new NativeArray<float3>(countn, Allocator.Persistent);
Since i don't know the number of lists(arrays) i need i was thinking of holding them in some kind of DynamicBuffer or just a HashMap (n - the number being the key and the NativeArray the value). Is that a good idea - can i instead make a NativeArray of NativeArrays?
Would i be better off just making one big NativeArray (merging all the lists together and keeping a pointer/index-number where each list starts and ends?)
As i mentioned, the job will take two lists and then iterate/batch items of the first array to compare against the second.
Am i missing something - is there a better way - or will my ideas even work - will it be suboptimal from an ECS perspective?
