FairyGUI.NGraphics.FillUVOfQuad C# (CSharp) Method

FillUVOfQuad() public static method

public static FillUVOfQuad ( Vector2 uv, int index, Rect rect ) : void
uv UnityEngine.Vector2
index int
rect UnityEngine.Rect
return void
        public static void FillUVOfQuad(Vector2[] uv, int index, Rect rect)
        {
            uv[index] = new Vector2(rect.xMin, rect.yMin);
            uv[index + 1] = new Vector2(rect.xMin, rect.yMax);
            uv[index + 2] = new Vector2(rect.xMax, rect.yMax);
            uv[index + 3] = new Vector2(rect.xMax, rect.yMin);
        }

Usage Example

Esempio n. 1
0
        public static void FillHorizontal(OriginHorizontal origin, float amount, Rect vertRect, Rect uvRect, Vector3[] verts, Vector2[] uv)
        {
            if (origin == OriginHorizontal.Left)
            {
                vertRect.width = vertRect.width * amount;
                uvRect.width   = uvRect.width * amount;
            }
            else
            {
                vertRect.x    += vertRect.width * (1 - amount);
                vertRect.width = vertRect.width * amount;
                uvRect.x      += uvRect.width * (1 - amount);
                uvRect.width   = uvRect.width * amount;
            }

            NGraphics.FillVertsOfQuad(verts, 0, vertRect);
            NGraphics.FillUVOfQuad(uv, 0, uvRect);
        }
All Usage Examples Of FairyGUI.NGraphics::FillUVOfQuad