Version 2.1.0.0

Odin has a dedicated attribute overview with examples

VerticalGroupAttribute class

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)]
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.

Inheritance
Example

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;
}

Constructors

VerticalGroupAttribute(Int32)

Groups properties vertically.

GroupId: _DefaultVerticalGroup

public VerticalGroupAttribute(int order = 0)
Parameters
System.Int32 order

The group order.

VerticalGroupAttribute(String, Int32)
Groups properties vertically.
public VerticalGroupAttribute(string groupId, int order = 0)
Parameters
System.String groupId

The group ID.

System.Int32 order

The group order.

Fields

PaddingBottom
Space in pixels at the bottom of the group.
public float PaddingBottom
PaddingTop
Space in pixels at the top of the group.
public float PaddingTop

Methods

CombineValuesWith(PropertyGroupAttribute)
Combines properties that have been group vertically.
protected override void CombineValuesWith(PropertyGroupAttribute other)
Parameters
PropertyGroupAttribute other

The group attribute to combine with.

This website is brand new and built with the Odin 2.1 beta in mind. This means you might discover some features such as attribute expressions that are only available in the beta.

You can download the 2.1 beta from here and read the patch-notes here.