private bool PixelHasAlpha(int x, int y, ITexture2D texture) { if (this.m_AlphaPixelCache == null) { this.m_AlphaPixelCache = new bool[texture.width * texture.height]; Color32[] pixels = texture.GetPixels32(); for (int i = 0; i < pixels.Length; i++) { this.m_AlphaPixelCache[i] = (pixels[i].a != 0); } } int num = y * texture.width + x; return(this.m_AlphaPixelCache[num]); }