# TryGetHandlerState<T>(HierarchyNodeType, out T)

> Gets the state a node type handler keeps for this view model.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Hierarchy](/engine/6000.6/script-reference/unity/hierarchy.md)
* **Assembly:** UnityEngine.HierarchyCoreModule

## TryGetHandlerState\<T>(HierarchyNodeType, T)

```csharp
public bool TryGetHandlerState<T>(HierarchyNodeType nodeType, out T state) where T : class, IHierarchyNodeTypeHandlerViewModelState
```

### Parameters

**** (\[HierarchyNodeType]\(/engine/6000.6/script-reference/unity/hierarchy/hierarchynodetype)): The node type of the handler owning the state.**** (T): When this method returns, the state, or `null` when there is none.

### Returns

| Type                                                          | Description                                                      |
| ------------------------------------------------------------- | ---------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if the handler has state of that type, `false` otherwise. |
