包含此页的版本:
不含此页的版本:
class in UnityEngine
使变量不显示在 Inspector 中,但进行序列化。
using UnityEngine;public class Example : MonoBehaviour { // Make the variable p not show up in the inspector // but be serialized. [HideInInspector] int p = 5; }