Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetDefaultParentObject(GameObject)

Sets the default parent object for the active Scene.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
public static void SetDefaultParentObject(GameObject defaultParentObject)

Parameters

defaultParentObject

The GameObject to set as the default parent object.

Remarks

When a GameObject is created or dragged into the Scene, the GameObject is automatically parented by the default parent. The default parent object can be set per scene.