HideFlags.NotEditable 不可编辑
Description描述
The object is not be editable in the inspector
物体在检视面板不可编辑。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void Start() {
GameObject createdGO = GameObject.CreatePrimitive(PrimitiveType.Plane);
createdGO.hideFlags = HideFlags.NotEditable;
}
}
// 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;
}
最后修改:2011年5月10日 Tuesday 9:48