Biến Public hoặc có đánh dấu [SerializeField] (những private) sẽ được hiển thị ở Inspector
Kiểu List sẽ hiển thị một section Collapse
publicList<GameObject>m_VisualWheels;
Kiểu khởi tạo luôn một “struct” và “struct” đó phải là “[System.Serializable]” thì sẽ hiển thị là một section Collapse
[System.Serializable]publicstructStats{[Header("Movement Settings")][Min(0.001f),Tooltip("Top speed attainable when moving forward.")]publicfloatTopSpeed;[Tooltip("How quickly the kart reaches top speed.")]publicfloatAcceleration;[Range(0.2f,1)]publicfloatAccelerationCurve;//...}publicArcadeKart.StatsbaseStats=newArcadeKart.Stats// <--- Section Collapse{TopSpeed=10f,Acceleration=5f,AccelerationCurve=4f// ...};
Kiểu LayerMask sẽ hiển thị một option-select các Layers
[Tooltip("Which layers the wheels will detect.")]publicLayerMaskGroundLayers=Physics.DefaultRaycastLayers;