Version: Unity 6 Preview (6000.0)
LanguageEnglish
  • C#

MeshGenerationContext.DrawText

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public void DrawText(string text, Vector2 pos, float fontSize, Color color, TextCore.Text.FontAsset font);

Parameters

text The text to display.
pos The start position where the text will be displayed.
fontSize The font size to use.
color The text color.
font 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 <see cref="IStyle.unityFontDefinition" />.

Description

Draw a string of text.