class in UnityEngine
使变量不显示在 Inspector 中,但进行序列化。
using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { [HideInInspector] public int p = 5; }