文档

Unity Engine

Unity Engine

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

Draw a string of text.
阅读时间1 分钟最后更新于 1 个月前

Definition

public void DrawText(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 IStyle.unityFontDefinition.