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: Unity.AppUI.dll
Syntax
public sealed class Text : LocalizedTextElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IBindable, INotifyValueChanged<string>, IContextOverrideElement, IAdditionalDataHolder
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 const string primaryUssClassName = "appui-text--primary"
Field Value
Type | Description |
---|---|
string |
sizeUssClassName
The Text size styling class.
Declaration
public const string sizeUssClassName = "appui-text--size-"
Field Value
Type | Description |
---|---|
string |
ussClassName
The Text main styling class.
Declaration
public const string ussClassName = "appui-text"
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 |
Methods
GetSizeUssClassName(TextSize)
Declaration
public static string GetSizeUssClassName(TextSize enumValue)
Parameters
Type | Name | Description |
---|---|---|
TextSize | enumValue |
Returns
Type | Description |
---|---|
string |
Implements
UnityEngine.UIElements.INotifyValueChanged<T>