# IStateView

> The generated view for a State.

## Definition

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

```csharp
public interface IStateView
```

## Remarks

Passed to [StateView\<T>](/engine/6000.7/script-reference/unity/graphtoolkit/editor/stateview1.md) as its [StateView\<T>.View](/engine/6000.7/script-reference/unity/graphtoolkit/editor/stateview1/view.md). Add custom UI to [IStateView.Root](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istateview/root.md). Its contents 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`.

## Properties

| Property                                                                             | Description                                                                                                                                      |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Root](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istateview/root.md) | The root [VisualElement](/engine/6000.7/script-reference/unityengine/uielements/visualelement.md) of the state, to which custom UI can be added. |
