summaryrefslogtreecommitdiff
path: root/Assets/Test/04_Graphic/UI04_MeshModifierTest.cs
blob: b679853a073b4841d3eb184f7937c0b69cff5d0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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;
	}

}