1using System.Collections.Generic;
5[AddComponentMenu(
"UI/ToJ Effects/Inner Outline", 20)]
6[DisallowMultipleComponent]
7[RequireComponent(typeof(Text))]
30 private List<UIVertex>
m_Verts =
new List<UIVertex>();
41 if (base.graphic !=
null)
43 base.graphic.SetVerticesDirty();
57 if (base.graphic !=
null)
59 base.graphic.SetVerticesDirty();
73 if (base.graphic !=
null)
75 base.graphic.SetVerticesDirty();
86 if (base.graphic !=
null)
88 base.graphic.SetMaterialDirty();
100 for (
int i = 0; i < count; i++)
103 if (value.uv1 == Vector4.zero)
105 value.uv1 =
new Vector2(1f, 1f);
110 vh.AddUIVertexTriangleStream(
m_Verts);
117 base.graphic.SetMaterialDirty();
127 if (baseMaterial.shader != Shader.Find(
"Text Effects/Fancy Text"))
129 Debug.Log(
"\"" + base.gameObject.name +
"\" doesn't have the \"Fancy Text\" shader applied. Please use it if you are using the \"Inner Outline\" effect.");
137 m_ModifiedMaterial.name = baseMaterial.name +
" with IO";
138 m_ModifiedMaterial.hideFlags = HideFlags.HideInHierarchy | HideFlags.HideInInspector;
139 m_ModifiedMaterial.shaderKeywords = baseMaterial.shaderKeywords;
bool m_NeedsToSetMaterialDirty
override void ModifyMesh(VertexHelper vh)
virtual Material GetModifiedMaterial(Material baseMaterial)
Material m_ModifiedMaterial