# Root

> The root VisualElement of the state, to which custom UI can be added.

## Definition

* **Type:** Property
* **Namespace:** [Unity.GraphToolkit.Editor](/engine/6000.7/script-reference/unity/graphtoolkit/editor.md)
* **Assembly:** UnityEditor

```csharp
VisualElement Root { get; }
```

### Remarks

The contents of `Root` are cleared each time the state returns from being culled. Cache any custom UI you allocated in [StateView\<T>.OnViewBuilt](/engine/6000.7/script-reference/unity/graphtoolkit/editor/stateview1/onviewbuilt.md) and re-add it from [StateView\<T>.OnCullingChanged](/engine/6000.7/script-reference/unity/graphtoolkit/editor/stateview1/oncullingchanged.md) when `cullingEnabled` is false.
