From b357a6a6d914e46c2c782f215e9f566f92663850 Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 9 Apr 2021 20:37:24 +0800 Subject: *UI effect --- Assets/Test/04_Graphic/UI04_MeshModifierTest.cs | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Assets/Test/04_Graphic/UI04_MeshModifierTest.cs (limited to 'Assets/Test/04_Graphic/UI04_MeshModifierTest.cs') diff --git a/Assets/Test/04_Graphic/UI04_MeshModifierTest.cs b/Assets/Test/04_Graphic/UI04_MeshModifierTest.cs new file mode 100644 index 0000000..d1bad84 --- /dev/null +++ b/Assets/Test/04_Graphic/UI04_MeshModifierTest.cs @@ -0,0 +1,27 @@ +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); + } + +} -- cgit v1.1-26-g67d0