DrawText(string, Vector2, float, Color, FontAsset)
Draw a string of text.
Read time 1 minuteLast updated 9 days ago
Definition
- Type: Method
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
public void DrawText(string text, Vector2 pos, float fontSize, Color color, FontAsset font = null)
Parameters
The text to display.
The start position where the text will be displayed.
The font size to use.
The text color.
The font asset to use. If the value is null, the font asset of the VisualElement style is used instead. For more information, refer to _unityFontDefinition.