Skip to content

TextStudioDecorationGraphic

ClassTextStudioTextStudio
[AddComponentMenu("")]
[DisallowMultipleComponent]
public sealed class TextStudioDecorationGraphic : MaskableGraphic

UnityEngine.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.

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
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}
public void ClearGeometry()

Drop all geometry - the graphic renders an empty mesh.

protected override void OnPopulateMesh(VertexHelper vh)

No description is available for this member.

Parameters

Name Type Description
vh UnityEngine.UI.VertexHelper

public TextStudioDecorationGraphic()

No description is available for this member.

public override Texture mainTexture { get; }

No description is available for this member.

Returns

UnityEngine.Texture — No return description is available.

public override Material material { get; set; }

No description is available for this member.

Returns

UnityEngine.Material — No return description is available.