diff options
author | chai <chaifix@163.com> | 2021-04-09 20:37:24 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-04-09 20:37:24 +0800 |
commit | b357a6a6d914e46c2c782f215e9f566f92663850 (patch) | |
tree | 207c6e974fff81db29e96e3459fb3e8d3ee9aaab /Assets/Test/04_Graphic/UI04_MeshModifierTest.cs | |
parent | 6c0dc6615522a7308fc7457b469521ee82130705 (diff) |
*UI effect
Diffstat (limited to 'Assets/Test/04_Graphic/UI04_MeshModifierTest.cs')
-rw-r--r-- | Assets/Test/04_Graphic/UI04_MeshModifierTest.cs | 27 |
1 files changed, 27 insertions, 0 deletions
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);
+ }
+ +} |