Space Attribute:自帶屬性,用于控制字段與字段在檢查器中顯示的間隔
using Sirenix.OdinInspector;
using UnityEngine;
public class SpaceAttributeExample : MonoBehaviour
{
[Space]
public int Space;
// 但是正如其名稱所示,PropertySpace也可以應用于屬性。.
[ShowInInspector, PropertySpace]
public string Property { get; set; }
// 您還可以控制PropertySpace屬性前后的間距。
[PropertySpace(SpaceBefore = 0, SpaceAfter = 60), PropertyOrder(2)]
public int BeforeAndAfter;
}