Search Unity

What is the maximum size of the array NativeArray <T>?

Discussion in 'Scripting' started by urbemAngeli, Oct 26, 2021.

  1. urbemAngeli

    urbemAngeli

    Joined:
    May 12, 2017
    Posts:
    61
    I need to get raw texture colors (32 * 32), without any compression. I am using the GetRawTextureData <Color32> method, however, I always get the size of the array at 256 elements, which is less than the original texture. I did not find information about the maximum size of the NativeArray <T>. Why it happens?
     
  2. RendergonPolygons

    RendergonPolygons

    Joined:
    Oct 9, 2019
    Posts:
    98
    it's happening to me too , Unity 2020.3.2.2, . Compare GetRawTextureData vs GetPixels where the former has less items in the array than the latter
     
  3. RendergonPolygons

    RendergonPolygons

    Joined:
    Oct 9, 2019
    Posts:
    98