# AddToLayer

The following code creates a [Text](https://github.com/flatredball/FlatRedBallDocs/blob/main/frb/docs/index.php) object and adds it to a layer.

```
Layer layer = SpriteManager.AddLayer();

Text text = TextManager.AddText("Hello", layer);
```

Alternatively the Text can be added to a Layer after AddText is called. The following code can also be used:

```
Layer layer = SpriteManager.AddLayer();

Text text = TextManager.AddText("Hello");
TextManager.AddToLayer(text, layer);
```
