# sm.debugDraw.addText

Adds text in world debug draw.

**Kind:** Function

**Environments:** Game, Terrain

## Game

``` { .lua .api-signature }
sm.debugDraw.addText( name, text, position, fade?, scale?, color? )
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.debugDraw.md#addtext)

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | The text name. |
| `text` | string | The text content. |
| `position` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The world position of the text. |
| `fade` *(optional)* | boolean | If the text should fade. Defaults to false. |
| `scale` *(optional)* | number | The scale of the text. Defaults to 30. |
| `color` *(optional)* | [Color](../Game-Script-Environment/Userdata/Color.md) | The color. Defaults to white. |

## Terrain

``` { .lua .api-signature }
sm.debugDraw.addText( name, text, position, fade?, scale?, color? )
```

[Open the full Terrain reference](../Terrain-Script-Environment/Static-Functions/sm.debugDraw.md#addtext)

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | The text name. |
| `text` | string | The text content. |
| `position` | [Vec3](../Terrain-Script-Environment/Userdata/Vec3.md) | The world position of the text. |
| `fade` *(optional)* | boolean | If the text should fade. Defaults to false. |
| `scale` *(optional)* | number | The scale of the text. Defaults to 30. |
| `color` *(optional)* | [Color](../Terrain-Script-Environment/Userdata/Color.md) | The color. Defaults to white. |
