Tex.GetColors
void GetColors(Color32[]& colorData, int mipLevel)
Retrieve the color data of the texture from the GPU. This can be a very slow operation, so use it cautiously. If the color array is the correct size, it will not be re-allocated.
Color32[]& colorData | An array of colors that will be filled out with the texture’s data. It can be null, or an incorrect size. If so, it will be reallocated to the correct size. |
int mipLevel | Retrieves the color data for a specific mip-mapping level. This function will log a fail and return a black array if an invalid mip-level is provided. |
Color32[] GetColors(int mipLevel)
Retrieve the color data of the texture from the GPU. This can be a very slow operation, so use it cautiously.
int mipLevel | Retrieves the color data for a specific mip-mapping level. This function will log a fail and return a black array if an invalid mip-level is provided. |
RETURNS: Color32[] | The texture’s color values in an array sized Width*Height. |
Found an issue with these docs, or have some additional questions? Create an Issue on Github!