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

> Draw a string of text.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.0/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public void DrawText(string text, Vector2 pos, float fontSize, Color color, FontAsset font = null)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The text to display.**** (\[Vector2]\(/engine/6000.0/script-reference/unityengine/vector2)): The start position where the text will be displayed.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The font size to use.**** (\[Color]\(/engine/6000.0/script-reference/unityengine/color)): The text color.**** (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](/engine/6000.0/script-reference/unityengine/uielements/istyle/unityfontdefinition.md).
