This version of Unity is unsupported.

Hierarchy.SetParent

Declaration

public bool SetParent(ref Unity.Hierarchy.HierarchyNode node, ref Unity.Hierarchy.HierarchyNode parent);

Parameters

node The hierarchy node.
parent The hierarchy node to set as a parent.

Returns

bool true if the parent was set, false otherwise.

Description

Sets the parent of a hierarchy node.

This operation fails if either the node or its potential parent have a handler that prohibits this parent-child relationship.