TextStudioUnityUITextBackend
public sealed class TextStudioUnityUITextBackend : BaseMeshEffect, ITextStudioTextBackend, ITextStudioTextBackendAppearanceSupport, ITextStudioTextSourceBackend, ITextStudioLayoutBackend, ITextStudioMeshBackend, ITextStudioTextBackendRenderChannelSupportDrives 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.
Methods
Section titled “Methods”
EnsureForGameObject(GameObject)
Section titled “EnsureForGameObject(GameObject)”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
Attach(TextStudioText)
Section titled “Attach(TextStudioText)”public void Attach(TextStudioText owner)Attaches this backend to its Text Studio host.
Parameters
| Name | Type |
|---|---|
owner |
TextStudio.TextStudioText |
Detach()
Section titled “Detach()”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
PushText(in TextStudioBackendTextRequest)
Section titled “PushText(in TextStudioBackendTextRequest)”public void PushText(in TextStudioBackendTextRequest request)Pushes compiled Text Studio output into the legacy Text source.
Parameters
| Name | Type |
|---|---|
request |
TextStudio.TextStudioBackendTextRequest |
PushRawAuthoringText(string)
Section titled “PushRawAuthoringText(string)”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
Render(in TextStudioFrame, bool)
Section titled “Render(in TextStudioFrame, bool)”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 |
RestoreOutput()
Section titled “RestoreOutput()”public void RestoreOutput()Clears retained animation state and restores the source Text mesh.
ModifyMesh(VertexHelper)
Section titled “ModifyMesh(VertexHelper)”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 |
OnRectTransformDimensionsChange()
Section titled “OnRectTransformDimensionsChange()”protected override void OnRectTransformDimensionsChange()Marks native layout as pending after the RectTransform’s dimensions change.
Constructors
Section titled “Constructors”
TextStudioUnityUITextBackend()
Section titled “TextStudioUnityUITextBackend()”public TextStudioUnityUITextBackend()Properties
Section titled “Properties”
BackendId
Section titled “BackendId”public string BackendId { get; }Stable backend identifier used by selection, diagnostics, and integrations.
Returns
System.String
DisplayName
Section titled “DisplayName”public string DisplayName { get; }User-facing renderer name.
Returns
System.String
Priority
Section titled “Priority”public int Priority { get; }Selection priority below specialized optional shaping backends.
Returns
System.Int32
SupportedRenderChannels
Section titled “SupportedRenderChannels”public TextStudioRenderChannels SupportedRenderChannels { get; }Legacy Text supports the complete shared vertex channel set except UV animation.
Returns
TextStudio.TextStudioRenderChannels
SupportsTextStudio2DAppearance
Section titled “SupportsTextStudio2DAppearance”public bool SupportsTextStudio2DAppearance { get; }Legacy bitmap-font rendering cannot execute Text Studio’s SDF Appearance stack.
Returns
System.Boolean
IsAvailable
Section titled “IsAvailable”public bool IsAvailable { get; }Gets whether the target can currently be controlled safely.
Returns
System.Boolean
TargetObject
Section titled “TargetObject”public Object TargetObject { get; }Gets the legacy Text component controlled by this backend.
Returns
UnityEngine.Object
Target
Section titled “Target”public Text Target { get; }Gets the strongly typed legacy Text target.
Returns
UnityEngine.UI.Text
IsEditableInputFieldTarget
Section titled “IsEditableInputFieldTarget”public bool IsEditableInputFieldTarget { get; }Gets whether this Text is the editable output of a legacy Input Field.
Returns
System.Boolean
AvailabilityDiagnostic
Section titled “AvailabilityDiagnostic”public string AvailabilityDiagnostic { get; }Gets actionable setup guidance when the backend is unavailable.
Returns
System.String
Capabilities
Section titled “Capabilities”public TextStudioTextBackendCapabilities Capabilities { get; }Gets the capabilities implemented by the legacy Canvas backend.
Returns
TextStudio.TextStudioTextBackendCapabilities
HasUnobservedTextChange
Section titled “HasUnobservedTextChange”public bool HasUnobservedTextChange { get; }Gets whether target text changed after Text Studio last synchronized it.
Returns
System.Boolean
CurrentText
Section titled “CurrentText”public string CurrentText { get; }Gets the text currently stored by the legacy Text target.
Returns
System.String
IsLayoutReady
Section titled “IsLayoutReady”public bool IsLayoutReady { get; }Gets whether public TextGenerator data is ready for layout publication.
Returns
System.Boolean
IsVisualOutputEnabled
Section titled “IsVisualOutputEnabled”public bool IsVisualOutputEnabled { get; }Gets whether the visible legacy Text output is enabled.
Returns
System.Boolean
NeedsComposedGlyphState
Section titled “NeedsComposedGlyphState”public bool NeedsComposedGlyphState { get; }Legacy Text consumes the shared evaluated vertex state directly.
Returns
System.Boolean
Events
Section titled “Events”
Changed
Section titled “Changed”public event Action<TextStudioTextBackendChange> ChangedOccurs after an external text, layout, or mesh change is observed.
Returns
System.Action{TextStudio.TextStudioTextBackendChange}