I have a regular NativeArray of colors. I want to efficiently sample and get a specific portion of data from that array depending on the given rect.
Let's say I have this 5x5 (25 in length) size 1D color array and I need to get data from this rect (x:2, y:1, w:3, h:2) as shown in the below picture
How can I do that?
If I try to use the function NativeArray<>.Copy it copies from index to length. So if I specify index 7 and 6 length it would copy from 7 to 12, which wouldn't work for me.
