Vertical Group Attribute特性:用于在檢查器的垂直組中一起收集屬性夹界。它本身并不能做很多事情千绪,但是與其他組(例如 Horizo??ntalGroupAttribute)組合使用可能會非常有用各聘。
using Sirenix.OdinInspector;
using UnityEngine;
public class VerticalGroupAttributeExample : MonoBehaviour
{
[HorizontalGroup("Split")]
[VerticalGroup("Split/Left")]
public InfoMessageType First;
[VerticalGroup("Split/Left")]
public InfoMessageType Second;
[VerticalGroup("Split/Right")]
public int A;
[VerticalGroup("Split/Right")]
public int B;
[TitleGroup("Multiple Stacked Boxes")]
[HorizontalGroup("Multiple Stacked Boxes/Split")]
[VerticalGroup("Multiple Stacked Boxes/Split/Left")]
[BoxGroup("Multiple Stacked Boxes/Split/Left/Box A")]
public int BoxA;
[BoxGroup("Multiple Stacked Boxes/Split/Left/Box B")]
public int BoxB;
[VerticalGroup("Multiple Stacked Boxes/Split/Right")]
[BoxGroup("Multiple Stacked Boxes/Split/Right/Box C")]
public int BoxC, BoxD, BoxE;
}