Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

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

HideFlags.NotEditable

Description

The object is not be editable in the inspector.

	// Create a plane and dont let it be modificable in the Inspector
	// nor in the Sceneview.

function Start() { var createdGO : GameObject = GameObject.CreatePrimitive(PrimitiveType.Plane); createdGO.hideFlags = HideFlags.NotEditable; }

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
    void Start() {
        GameObject createdGO = GameObject.CreatePrimitive(PrimitiveType.Plane);
        createdGO.hideFlags = HideFlags.NotEditable;
    }
}
import UnityEngine
import System.Collections

public class ExampleClass(MonoBehaviour):

	def Start() as void:
		createdGO as GameObject = GameObject.CreatePrimitive(PrimitiveType.Plane)
		createdGO.hideFlags = HideFlags.NotEditable