#How to flatten N amount of native arrays?

1 messages · Page 1 of 1 (latest)

muted vault
#

I have N native arrays that I want to pass to a job, all the same length and size, I cannot do NativeArray<NativeArray<float>>. So, what would be a way to do it? the length of it might be really long, so, in case I need to flatten it, how could I do that in a job?

scarlet gale
#

My probably unhelpful answer is that you should probably just be storing your data in a flattened array to begin with :/

agile bolt
#

As an alternative you can use UnsafeList<NativeArray<float>>

muted vault
#

That's what I did at the end, but NativeArray<UnsafeList<float>> (the other way is not allowed)