Skip to content

TextStudioUnityUITextBackend

ClassTextStudioTextStudio
public sealed class TextStudioUnityUITextBackend : BaseMeshEffect, ITextStudioTextBackend, ITextStudioTextBackendAppearanceSupport, ITextStudioTextSourceBackend, ITextStudioLayoutBackend, ITextStudioMeshBackend, ITextStudioTextBackendRenderChannelSupport

Drives a legacy UnityEngine.UI.Text through Text Studio while preserving Unity’s Canvas mesh pipeline. The component must run before other mesh modifiers so Outline, Shadow, and custom effects receive the already animated glyph geometry.

public static TextStudioUnityUITextBackend EnsureForGameObject(GameObject gameObject)

Adds or returns the backend for a legacy Text and Text Studio hub on one GameObject.

Parameters

Name Type
gameObject UnityEngine.GameObject

Returns

TextStudio.TextStudioUnityUITextBackend

public void Attach(TextStudioText owner)

Attaches this backend to its Text Studio host.

Parameters

Name Type
owner TextStudio.TextStudioText
public void Detach()

Detaches from the host and restores the unmodified Canvas mesh.

TryPullText(bool, TextStudioBackendWriteHandling, string, out string, out bool)

Section titled “TryPullText(bool, TextStudioBackendWriteHandling, string, out string, out bool)”
public bool TryPullText(bool isDriving, TextStudioBackendWriteHandling handling, string currentMarkup, out string newMarkup, out bool ignoredExternalWrite)

Resolves an external Text.text mutation according to the host write policy.

Parameters

Name Type
isDriving System.Boolean
handling TextStudio.TextStudioBackendWriteHandling
currentMarkup System.String
newMarkup System.String
ignoredExternalWrite System.Boolean

Returns

System.Boolean

public void PushText(in TextStudioBackendTextRequest request)

Pushes compiled Text Studio output into the legacy Text source.

Parameters

Name Type
request TextStudio.TextStudioBackendTextRequest
public void PushRawAuthoringText(string markup)

Writes raw authoring markup into the legacy Text field.

Parameters

Name Type
markup System.String

TryBuildLayout(in TextStudioBackendLayoutRequest, TextStudioBackendLayoutBuilder)

Section titled “TryBuildLayout(in TextStudioBackendLayoutRequest, TextStudioBackendLayoutBuilder)”
public bool TryBuildLayout(in TextStudioBackendLayoutRequest request, TextStudioBackendLayoutBuilder builder)

Builds renderer-neutral glyph layout from the public TextGenerator output.

Parameters

Name Type
request TextStudio.TextStudioBackendLayoutRequest
builder TextStudio.TextStudioBackendLayoutBuilder

Returns

System.Boolean

public void Render(in TextStudioFrame frame, bool suppressOutput)

Copies the transient Text Studio frame and schedules one Canvas vertex rebuild.

Parameters

Name Type
frame TextStudio.TextStudioFrame
suppressOutput System.Boolean
public void RestoreOutput()

Clears retained animation state and restores the source Text mesh.

public override void ModifyMesh(VertexHelper vertexHelper)

Applies retained Text Studio glyph state inside Unity’s normal Canvas modifier chain.

Parameters

Name Type
vertexHelper UnityEngine.UI.VertexHelper
protected override void OnRectTransformDimensionsChange()

Marks native layout as pending after the RectTransform’s dimensions change.

public TextStudioUnityUITextBackend()

public string BackendId { get; }

Stable backend identifier used by selection, diagnostics, and integrations.

Returns

System.String

public string DisplayName { get; }

User-facing renderer name.

Returns

System.String

public int Priority { get; }

Selection priority below specialized optional shaping backends.

Returns

System.Int32

public TextStudioRenderChannels SupportedRenderChannels { get; }

Legacy Text supports the complete shared vertex channel set except UV animation.

Returns

TextStudio.TextStudioRenderChannels

public bool SupportsTextStudio2DAppearance { get; }

Legacy bitmap-font rendering cannot execute Text Studio’s SDF Appearance stack.

Returns

System.Boolean

public bool IsAvailable { get; }

Gets whether the target can currently be controlled safely.

Returns

System.Boolean

public Object TargetObject { get; }

Gets the legacy Text component controlled by this backend.

Returns

UnityEngine.Object

public Text Target { get; }

Gets the strongly typed legacy Text target.

Returns

UnityEngine.UI.Text

public bool IsEditableInputFieldTarget { get; }

Gets whether this Text is the editable output of a legacy Input Field.

Returns

System.Boolean

public string AvailabilityDiagnostic { get; }

Gets actionable setup guidance when the backend is unavailable.

Returns

System.String

public TextStudioTextBackendCapabilities Capabilities { get; }

Gets the capabilities implemented by the legacy Canvas backend.

Returns

TextStudio.TextStudioTextBackendCapabilities

public bool HasUnobservedTextChange { get; }

Gets whether target text changed after Text Studio last synchronized it.

Returns

System.Boolean

public string CurrentText { get; }

Gets the text currently stored by the legacy Text target.

Returns

System.String

public bool IsLayoutReady { get; }

Gets whether public TextGenerator data is ready for layout publication.

Returns

System.Boolean

public bool IsVisualOutputEnabled { get; }

Gets whether the visible legacy Text output is enabled.

Returns

System.Boolean

public bool NeedsComposedGlyphState { get; }

Legacy Text consumes the shared evaluated vertex state directly.

Returns

System.Boolean

public event Action<TextStudioTextBackendChange> Changed

Occurs after an external text, layout, or mesh change is observed.

Returns

System.Action{TextStudio.TextStudioTextBackendChange}