Is there way to get Texture2DArray.GetPixelData() for all whole Array?

I’m trying to create a texture using Unity.Jobs, but when i try to use GetPixelData(), it requires me to enter an index for the element. So I can’t pass the data to a IJobParallelFor in one array.

Is there way to get a NativeArray for the whole Texture2DArray, not just the element slice, so i can write to it in a Job?

Did something like this but doesnt work.

var data = texture2dArray.GetPixelData<Color32>(0, 0);
NativeArrayUnsafeUtility.ConvertExistingDataToNativeArray<Color32>(NativeArrayUnsafeUtility.GetUnsafeBufferPointerWithoutChecks(data), data.Length * texture2dArray.depth, Allocator.None)

If i have to skip some bytes between elements, i can do that inside the job. I just need to know how to do it somehow.

someone told me, they are not sequentially, well then i cant do this i guess

ok managed to do it by making a NativeArray of NativeArray pointers.
If someone else has the same problem i can give an example.

I have the same issue. Can you post an example of how you did that?