UnityEngine.UI.PositionAsUV1.ModifyMesh C# (CSharp) Method

ModifyMesh() public method

public ModifyMesh ( VertexHelper vh ) : void
vh VertexHelper
return void
        public override void ModifyMesh(VertexHelper vh)
        {
            UIVertex vertex = new UIVertex();
            for (int i = 0; i < vh.currentVertCount; i++)
            {
                vh.PopulateUIVertex(ref vertex, i);
                vertex.uv1 = new Vector2(vertex.position.x, vertex.position.y);
                vh.SetUIVertex(vertex, i);
            }
        }
    }

Usage Example

 static public int ModifyMesh(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.UI.PositionAsUV1 self = (UnityEngine.UI.PositionAsUV1)checkSelf(l);
         UnityEngine.UI.VertexHelper  a1;
         checkType(l, 2, out a1);
         self.ModifyMesh(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
All Usage Examples Of UnityEngine.UI.PositionAsUV1::ModifyMesh