TextStudioDecorationGraphic
[AddComponentMenu("")][DisallowMultipleComponent]public sealed class TextStudioDecorationGraphic : MaskableGraphicUnityEngine.UI.MaskableGraphic used inside TextStudio.TextStudioDecorations
to render curved underline / strikethrough / double underline / overline
tiles inside a Canvas. The decoration subsystem calls
TextStudio.TextStudioDecorationGraphic.SetGeometry(System.Collections.Generic.List%7bUnityEngine.Vector3%7d%2cSystem.Collections.Generic.List%7bUnityEngine.Color32%7d%2cSystem.Collections.Generic.List%7bUnityEngine.Vector4%7d%2cSystem.Collections.Generic.List%7bSystem.Int32%7d) every tick with updated tile verts/colors/uvs
/triangles computed against the hub’s font metrics, placement, and
animation state; this component routes them through the standard UGUI
UnityEngine.UI.VertexHelper pipeline so Canvas batching, masking, and
draw order behave exactly like they do for a native TMP text graphic.
Methods
Section titled “Methods”
ApplyMaterial(Material)
Section titled “ApplyMaterial(Material)”public void ApplyMaterial(Material source)Swap the graphic’s material and main texture. Called from the decoration subsystem to inherit TMP’s font material (atlas, SDF softness, outline / face color) so tiles visually match the text.
Parameters
| Name | Type | Description |
|---|---|---|
source |
UnityEngine.Material | |
SetGeometry(List, List, List, List)
Section titled “SetGeometry(List, List, List, List)”public void SetGeometry(List<Vector3> verts, List<Color32> colors, List<Vector4> uvs, List<int> tris)Upload tile geometry. Lists are copied into UnityEngine.UIVertex
entries so the UGUI mesh build pipeline can consume them directly.
Parameters
| Name | Type | Description |
|---|---|---|
verts |
System.Collections.Generic.List{UnityEngine.Vector3} | |
colors |
System.Collections.Generic.List{UnityEngine.Color32} | |
uvs |
System.Collections.Generic.List{UnityEngine.Vector4} | |
tris |
System.Collections.Generic.List{System.Int32} | |
ClearGeometry()
Section titled “ClearGeometry()”public void ClearGeometry()Drop all geometry - the graphic renders an empty mesh.
OnPopulateMesh(VertexHelper)
Section titled “OnPopulateMesh(VertexHelper)”protected override void OnPopulateMesh(VertexHelper vh)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
vh |
UnityEngine.UI.VertexHelper |
Constructors
Section titled “Constructors”
TextStudioDecorationGraphic()
Section titled “TextStudioDecorationGraphic()”public TextStudioDecorationGraphic()No description is available for this member.
Properties
Section titled “Properties”
mainTexture
Section titled “mainTexture”public override Texture mainTexture { get; }No description is available for this member.
Returns
UnityEngine.Texture — No return description is available.
material
Section titled “material”public override Material material { get; set; }No description is available for this member.
Returns
UnityEngine.Material — No return description is available.