Version: 2017.2
public Color32[] GetPixels32 (int x, int y, int blockWidth, int blockHeight);

Parámetros

x Coordenada-X de la esquina superior izquierda del rectángulo para agarrar.
y Coordenada-Y de la esquina superior izquierda del rectángulo para agarrar.
blockWidth Ancho del rectángulo para agarrar.
blockHeight Height of the rectangle to grab. Get the pixel values from a rectangular area of a ProceduralTexture into an array. The block is specified by its x,y offset in the texture and by its width and height. The block is "flattened" into the array by scanning the pixel values across rows one by one.

Descripción

Coge los valores de los píxeles de una ProceduralTexture.

Esto sólo funciona para las instancias ProceduralMaterial que han sido marcadas como "Readable" (leíbles) y cuyo formato de textura está definido en RAW.

The correct sequence to use GetPixels32() is:
- Set the ProceduralMaterial "Readable" flag using ProceduralMaterial.isReadable
- Rebuild the ProceduralMaterial's textures using ProceduralMaterial.RebuildTexturesImmediately
- Llame GetPixels32().

See Also: ProceduralMaterial.isReadable, ProceduralMaterial.RebuildTexturesImmediately, Texture2D.GetPixels32.