# SetParent(in HierarchyNode, in HierarchyNode)

> Sets the parent node of a hierarchy node.

## Definition

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

## SetParent(HierarchyNode, HierarchyNode)

```csharp
public bool SetParent(in HierarchyNode node, in HierarchyNode parent)
```

### Parameters

**** (\[HierarchyNode]\(/engine/6000.0/script-reference/unity/hierarchy/hierarchynode)): The hierarchy node to set a parent for.**** (\[HierarchyNode]\(/engine/6000.0/script-reference/unity/hierarchy/hierarchynode)): The hierarchy node to set as the parent node.

### Returns

| Type                                                          | Description                                                        |
| ------------------------------------------------------------- | ------------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if the command was appended to the list, `false` otherwise. |
