using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; [ExecuteInEditMode] public class UI04_MeshModifierTest : UnityEngine.EventSystems.UIBehaviour, IMeshModifier{ static UIVertex vert = new UIVertex(); public void ModifyMesh(Mesh mesh) { } public void ModifyMesh(VertexHelper verts) { Debug.Log("ModifyMesh"); //vert.position = new Vector3(100, 100); //vert.color = Color.white; //verts.AddVert(vert); //vert.position = new Vector3(120, 100); //verts.AddVert(vert); //vert.position = new Vector3(120, 110); //verts.AddVert(vert); //verts.AddTriangle(4, 5, 6); verts.m_Colors[0] = Color.red; verts.m_Colors[1] = Color.yellow; verts.m_Colors[2] = Color.black; verts.m_Colors[3] = Color.white; } }