Legacy Documentation: Version 5.1
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

HideFlags.HideInHierarchy

Switch to Manual

Description

The object will not appear in the hierarchy.

	// Creates 5 planes and hides them from the Hierarchy in the Editor.

function Start() { for(var i : int = 0; i < 5; i++) { var createdGO : GameObject = GameObject.CreatePrimitive(PrimitiveType.Plane); createdGO.hideFlags = HideFlags.HideInHierarchy; } }