public float notHidden; // Displayed [HideInInspector] // Hides var below public float hidden;
using UnityEngine; public class Example : MonoBehaviour { // Make the variable p not show up in the inspector // but be serialized. [HideInInspector] int p = 5; }
[HideInInspector] public float myVar;