TextStudioUITK
public static class TextStudioUITKAttaches, retrieves, and detaches Text Studio through Unity’s native text binding slot.
Methods
Section titled “Methods”
AttachTextStudio(TextElement)
Section titled “AttachTextStudio(TextElement)”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
GetTextStudioBinding(TextElement)
Section titled “GetTextStudioBinding(TextElement)”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
DetachTextStudio(TextElement)
Section titled “DetachTextStudio(TextElement)”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 |