Skip to content

TextStudioUITK

ClassTextStudioTextStudio
public static class TextStudioUITK

Attaches, retrieves, and detaches Text Studio through Unity’s native text binding slot.

public static TextStudioBinding AttachTextStudio(this TextElement element)

Gets or creates a binding, attaches it to the element, and returns it for configuration.

Parameters

Name Type
element UnityEngine.UIElements.TextElement

Returns

TextStudio.TextStudioBinding

TryAttachTextStudio(TextElement, out TextStudioBinding)

Section titled “TryAttachTextStudio(TextElement, out TextStudioBinding)”
public static bool TryAttachTextStudio(this TextElement element, out TextStudioBinding binding)

Tries to create or retrieve a Text Studio text binding without replacing another binding.

Parameters

Name Type
element UnityEngine.UIElements.TextElement
binding TextStudio.TextStudioBinding

Returns

System.Boolean

public static TextStudioBinding GetTextStudioBinding(this TextElement element)

Gets an existing binding without creating or attaching one.

Parameters

Name Type
element UnityEngine.UIElements.TextElement

Returns

TextStudio.TextStudioBinding

public static void DetachTextStudio(this TextElement element)

Restores the element and clears only a Text Studio-owned text binding.

Parameters

Name Type
element UnityEngine.UIElements.TextElement