Class TextExtensions
public static class TextExtensions
- Inheritance
-
TextExtensions
Methods
Align(ref Text, TextAlign)
Controls how the text is positioned relative to its origin.
public static ref Text Align(this ref Text @this, TextAlign align)
Parameters
Returns
Color(ref Text, Color?)
Set the color for this Text.
public static ref Text Color(this ref Text @this, Color? color)
Parameters
Returns
FaceCamera(ref Text)
Make the visual always face the camera.
public static ref Text FaceCamera(this ref Text @this)
Parameters
thisText
Returns
Facing(ref Text, Facing)
The facing direction of this text.
public static ref Text Facing(this ref Text @this, Facing facing)
Parameters
Returns
Position(ref Text, float3)
Set the position for this Text.
public static ref Text Position(this ref Text @this, float3 position)
Parameters
Returns
Ref(Text)
Returns a reference to the previously created Text(ref Text, ReadOnlySpan<char>) visual.
If you need to keep a reference to a long-lived visual, this will
allow you to modify or delete the visual at some point in the future.
Important: only use this directly after creating a visual, as it may
not be valid beyond that.
public static VisualRef<Text> Ref(this Text @this)
Parameters
thisText
Returns
Rotation(ref Text, float)
Sets the facing rotation an degrees.
public static ref Text Rotation(this ref Text @this, float rotation)
Parameters
Returns
SetDefault(ref Text)
Size(ref Text, Size)
The size of a line of text in world space.
public static ref Text Size(this ref Text @this, Size size)
Parameters
Returns
Text(ref Text, ReadOnlySpan<char>)
Set the text from a span.
public static ref Text Text(this ref Text @this, ReadOnlySpan<char> text)
Parameters
thisTexttextReadOnlySpan<char>