1using System.Collections.Generic;
5[AddComponentMenu(
"UI/ToJ Effects/Outer Bevel", 4)]
6[RequireComponent(typeof(Text))]
7public class Bevel : BaseMeshEffect
21 private List<UIVertex>
m_Verts =
new List<UIVertex>();
32 if (base.graphic !=
null)
34 base.graphic.SetVerticesDirty();
48 if (base.graphic !=
null)
50 base.graphic.SetVerticesDirty();
66 if (base.graphic !=
null)
68 base.graphic.SetVerticesDirty();
83 if (base.graphic !=
null)
85 base.graphic.SetVerticesDirty();
94 protected void ApplyShadowZeroAlloc(List<UIVertex> verts, Color32 color,
int start,
int end,
float x,
float y)
96 for (
int i = start; i < end; i++)
98 UIVertex uIVertex = verts[i];
100 Vector3 position = uIVertex.position;
103 uIVertex.position = position;
104 Color32 color2 = color;
107 color2.a = (byte)(color2.a * verts[i].color.a / 255);
109 uIVertex.color = color2;
138 if (GetComponent<Text>().
material.shader == Shader.Find(
"Text Effects/Fancy Text"))
140 for (
int i = 0; i < m_Verts.Count - count; i++)
143 value.uv1 =
new Vector2(0f, 0f);
148 vh.AddUIVertexTriangleStream(
m_Verts);
Vector2 bevelDirectionAndDepth
Vector2 m_BevelDirectionAndDepth
override void ModifyMesh(VertexHelper vh)
void ApplyShadowZeroAlloc(List< UIVertex > verts, Color32 color, int start, int end, float x, float y)