BoxGroup is used on any property and organizes the property in a boxed group.

Use this to cleanly organize relevant values together in the inspector.

namespace Sirenix.OdinInspector
[AttributeUsageAttribute((AttributeTargets)448, AllowMultiple = True, Inherited = True)]
public class BoxGroupAttribute : PropertyGroupAttribute


Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector

See Also


Definition Description
BoxGroupAttribute() Initializes a new instance of the BoxGroupAttribute class. Use the other constructor overloads in order to show a header-label on the box group.
BoxGroupAttribute(string, bool, bool, int) Adds the property to the specified box group.


Return Type Definition Description
bool CenterLabel If true the header label will be places in the center of the group header. Otherwise it will be in left side.
bool ShowLabel If true a label for the group will be drawn on top.


Return Type Definition Description
void CombineValuesWith(PropertyGroupAttribute) Combines the box group with another group.


The following example shows how BoxGroup is used to organize properties together into a box.

public class BoxGroupExamples : MonoBehaviour
    // Box with a centered title.
    [BoxGroup("Centered Title", centerLabel: true)]
    public int A;

    [BoxGroup("Centered Title", centerLabel: true)]
    public int B;

    [BoxGroup("Centered Title", centerLabel: true)]
    public int C;

    // Box with a title.
    [BoxGroup("Left Oriented Title")]
    public int D;

    [BoxGroup("Left Oriented Title")]
    public int E;

    // Box with a title recieved from a field.
    [BoxGroup("$DynamicTitle1"), LabelText("Dynamic Title")]
    public string DynamicTitle1 = "Dynamic box title";

    public int F;

    // Box with a title recieved from a property.
    public int G;

    public int H;

    // Box without a title.
    [InfoBox("You can also hide the label of a box group.")]
    [BoxGroup("NoTitle", false)]
    public int I;

    public int J;

    public int K;

    public string DynamicTitle2
        get { return UnityEditor.PlayerSettings.productName; }

    [BoxGroup("Boxed Struct"), HideLabel]
    public SomeStruct BoxedStruct;

    public SomeStruct DefaultStruct;

    public struct SomeStruct
        public int One;
        public int Two;
        public int Three;