Class TextElement
Inheritance
TextElement
Implements
Inherited Members
Namespace: UnityEngine.Experimental.UIElements
Assembly: UnityEngine.dll
Syntax
public class TextElement : VisualElement, IEventHandler, ITransform, IUIElementDataWatch, IEnumerable<VisualElement>, IEnumerable, IVisualElementScheduler, IStyle, ITextElement
Constructors
| Improve this Doc View SourceTextElement()
Declaration
public TextElement()
Properties
| Improve this Doc View Sourcetext
Declaration
public virtual string text { get; set; }
Property Value
| Type | Description |
|---|---|
| String |
Methods
| Improve this Doc View SourceDoMeasure(Single, VisualElement.MeasureMode, Single, VisualElement.MeasureMode)
Declaration
protected override Vector2 DoMeasure(float width, VisualElement.MeasureMode widthMode, float height, VisualElement.MeasureMode heightMode)
Parameters
| Type | Name | Description |
|---|---|---|
| Single | width | |
| VisualElement.MeasureMode | widthMode | |
| Single | height | |
| VisualElement.MeasureMode | heightMode |
Returns
| Type | Description |
|---|---|
| Vector2 |
Overrides
| Improve this Doc View SourceDoRepaint(IStylePainter)
Declaration
protected override void DoRepaint(IStylePainter painter)
Parameters
| Type | Name | Description |
|---|---|---|
| IStylePainter | painter |
Overrides
| Improve this Doc View SourceMeasureTextSize(String, Single, VisualElement.MeasureMode, Single, VisualElement.MeasureMode)
Declaration
public Vector2 MeasureTextSize(string textToMeasure, float width, VisualElement.MeasureMode widthMode, float height, VisualElement.MeasureMode heightMode)
Parameters
| Type | Name | Description |
|---|---|---|
| String | textToMeasure | |
| Single | width | |
| VisualElement.MeasureMode | widthMode | |
| Single | height | |
| VisualElement.MeasureMode | heightMode |
Returns
| Type | Description |
|---|---|
| Vector2 |