# GetChildIndex(in HierarchyNode)

> Gets the index of a hierarchy node in its parent's children list.

## Definition

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

## GetChildIndex(HierarchyNode)

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

### Parameters

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

### Returns

| Type                                                       | Description                       |
| ---------------------------------------------------------- | --------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The node index, or -1 if invalid. |
