Class Text
A wrapper class for AdminToys.TextToy.
public class Text : AdminToy, IWorldSpace, IPosition, IRotation, IWrapper<TextToy>
- Inheritance
-
Text
- Implements
-
IWrapper<TextToy>
- Inherited Members
- Extension Methods
Properties
Base
Gets the base AdminToys.TextToy.
public TextToy Base { get; }
Property Value
- TextToy
DisplaySize
Gets or sets the size of the Display Size of the Text.
public Vector2 DisplaySize { get; set; }
Property Value
- Vector2
Prefab
Gets the prefab.
public static TextToy Prefab { get; }
Property Value
- TextToy
TextFormat
Gets or sets the Text shown.
public string TextFormat { get; set; }
Property Value
Methods
Create(Vector3?, Quaternion?, Vector3?, string, Vector2?, Transform, bool)
Creates a new Text.
public static Text Create(Vector3? position = null, Quaternion? rotation = null, Vector3? scale = null, string text = "Default Text", Vector2? displaySize = null, Transform parent = null, bool spawn = true)
Parameters
positionVector3?The local position of the Text.
rotationQuaternion?The local rotation of the Text.
scaleVector3?The local scale of the Text.
textstringThe text content to display.
displaySizeVector2?The display size of the text.
parentTransformThe transform to create this Text on.
spawnboolWhether the Text should be initially spawned.
Returns
Create(Transform, string)
Creates a new Text based on a Transform.
public static Text Create(Transform transform, string text)
Parameters
transformTransformThe transform to spawn at.
textstringThe text content to display.
Returns
Create(Transform, string, Vector2)
Creates a new Text based on a Transform with custom size.
public static Text Create(Transform transform, string text, Vector2 displaySize)
Parameters
transformTransformThe transform to spawn at.
textstringThe text content to display.
displaySizeVector2The display size of the text.
Returns
Create(Vector3, string)
Creates a new Text at the specified position.
public static Text Create(Vector3 position, string text)
Parameters
Returns
Create(Vector3, string, Vector2)
Creates a new Text with a specific position, text, and display size.
public static Text Create(Vector3 position, string text, Vector2 displaySize)
Parameters
positionVector3The local position of the Text.
textstringThe text content to display.
displaySizeVector2The display size of the text.