# IndexOf(in HierarchyNode)

> Gets the zero-based index of a specified node.

## Definition

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

## IndexOf(HierarchyNode)

```csharp
public int IndexOf(in HierarchyNode node)
```

### Parameters

**** (\[HierarchyNode]\(/engine/6000.5/script-reference/unity/hierarchy/hierarchynode)): The hierarchy node.

### Returns

| Type                                                       | Description                                            |
| ---------------------------------------------------------- | ------------------------------------------------------ |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | A zero-based index of the node if found, -1 otherwise. |
