Version: 2018.3 (switch to 2019.1)
LanguageEnglish
  • C#

HideFlags.HideInHierarchy

Description

The object will not appear in the hierarchy.

using UnityEngine;

public class Example : MonoBehaviour { // Creates 5 planes and hides them from the Hierarchy in the Editor.

void Start() { for (int i = 0; i < 5; i++) { GameObject createdGO = GameObject.CreatePrimitive(PrimitiveType.Plane); createdGO.hideFlags = HideFlags.HideInHierarchy; } } }
对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答