ドキュメント

Unity Engine

Unity Engine

Detach(in HierarchyNode)

Severs a hierarchy node from its parent, without removing it from the hierarchy.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: Unity.Hierarchy
  • Assembly: UnityEngine.HierarchyCoreModule

Detach(HierarchyNode)

public bool Detach(in HierarchyNode node)

Parameters

The hierarchy node to detach.

Returns

Type

Description

bool
true
if the command was appended to the list,
false
otherwise.

Remarks

A detached node keeps its own children but is no longer reachable from Hierarchy.Root. Nothing reclaims it: the caller must either re-attach it with HierarchyCommandList.SetParent or delete it with HierarchyCommandList.Remove.