Пример #1
0
        public void OnPopulateMesh(VertexBuffer vb, Color[] gradientColors)
        {
            Rect rect = texture.GetDrawRect(vb.contentRect);

            if (gradientColors != null)
            {
                vb.AddGradientColorsQuad(rect, vb.vertexColor, gradientColors, vb.uvRect);
            }
            else
            {
                vb.AddQuad(rect, vb.vertexColor, vb.uvRect);
            }
            vb.AddTriangles();
            vb._isArbitraryQuad = vertexMatrix != null;
        }