Namespace: | Sirenix.OdinInspector |
Assembly: | Sirenix.OdinInspector.Attributes |
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Parameter | AttributeTargets.Delegate | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter | AttributeTargets.All, AllowMultiple = true, Inherited = true)]
[Conditional("UNITY_EDITOR")]
public class VerticalGroupAttribute : PropertyGroupAttribute, _Attribute
VerticalGroup is used to gather properties together in a vertical group in the inspector.
This doesn't do much in and of itself, but in combination with other groups, such as HorizontalGroupAttribute it can be very useful.
The following example demonstrates how VerticalGroup can be used in conjunction with HorizontalGroupAttribute
public class MyComponent : MonoBehaviour
{
[HorizontalGroup("Split")]
[VerticalGroup("Split/Left")]
public Vector3 Vector;
[VerticalGroup("Split/Left")]
public GameObject First;
[VerticalGroup("Split/Left")]
public GameObject Second;
[VerticalGroup("Split/Right", PaddingTop = 18f)]
public int A;
[VerticalGroup("Split/Right")]
public int B;
}
Groups properties vertically.
GroupId: _DefaultVerticalGroup
public VerticalGroupAttribute(float order = 0F)
System.Single | order | The group order. |
public VerticalGroupAttribute(string groupId, float order = 0F)
System.String | groupId | The group ID. |
System.Single | order | The group order. |
public float PaddingBottom
public float PaddingTop
protected override void CombineValuesWith(PropertyGroupAttribute other)
PropertyGroupAttribute | other | The group attribute to combine with. |