Class Text
Text UI element.
Inheritance
Text
Implements
INotifyValueChanged<string>
Inherited Members
TextElement.HandleEvent(EventBase)
VisualElement.Focus()
VisualElement.Overlaps(Rect)
VisualElement.ToString()
VisualElement.GetFirstOfType<T>()
VisualElement.GetFirstAncestorOfType<T>()
VisualElement.canGrabFocus
VisualElement.focusController
VisualElement.cacheAsBitmap
CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
Namespace: Unity.AppUI.UI
Assembly: solution.dll
Syntax
public sealed class Text : LocalizedTextElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IBindable, INotifyValueChanged<string>, IContextOverrideElement
Constructors
Text()
Default constructor.
Declaration
public Text()
Text(string)
Construct a Text UI element and use the provided text as display text.
Declaration
public Text(string text)
Parameters
Type | Name | Description |
---|---|---|
string | text | The text that will be displayed. |
Fields
primaryUssClassName
The Text primary variant styling class.
Declaration
public static readonly string primaryUssClassName
Field Value
Type | Description |
---|---|
string |
sizeUssClassName
The Text size styling class.
Declaration
public static readonly string sizeUssClassName
Field Value
Type | Description |
---|---|
string |
ussClassName
The Text main styling class.
Declaration
public static readonly string ussClassName
Field Value
Type | Description |
---|---|
string |
Properties
primary
The primary variant of the text.
Declaration
public bool primary { get; set; }
Property Value
Type | Description |
---|---|
bool |
size
The size of the text.
Declaration
public TextSize size { get; set; }
Property Value
Type | Description |
---|---|
TextSize |
Implements
UnityEngine.UIElements.INotifyValueChanged<T>