Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


DrawTextStandard(string, Vector2, float, Color, FontAsset)

Draw a string of text using the Standard Text Generator.
Read time 1 minuteLast updated 11 days ago

Definition

Warning
Deprecated. DrawTextStandard is deprecated and will be removed in a future release. Use DrawText instead, which uses the Advanced Text Generator (ATG).
public void DrawTextStandard(string text, Vector2 pos, float fontSize, Color color, FontAsset font = null)

Parameters

text

The text to display.

The start position where the text will be displayed.

fontSize

The font size to use.

color

The text color.

font

FontAsset
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.