InlinePropertyAttribute

The Inline Property is used to place the contents of a type next to the label, instead of being rendered in a foldout.

namespace Sirenix.OdinInspector
{
[AttributeUsageAttribute((AttributeTargets)396, Inherited = False)]
public class InlinePropertyAttribute : Attribute
}

Requirements

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector
Version: 2.0.0.0

See Also

  • Attribute

Fields

Return Type Definition Description
int LabelWidth Specify a label width for all child properties.

Example

public class InlinePropertyExamples : MonoBehaviour
{
    public Vector3 Vector3;

    public Vector3Int Vector3Int;

    [InlineProperty(LabelWidth = 12)]  // It can be placed on classes as well as members
    public Vector2Int Vector2Int;

}

[Serializable]
[InlineProperty(LabelWidth = 12)] // It can be placed on classes as well as members
public struct Vector3Int
{
    [HorizontalGroup]
    public int X;

    [HorizontalGroup]
    public int Y;

    [HorizontalGroup]
    public int Z;
}

[Serializable]
public struct Vector2Int
{
    [HorizontalGroup]
    public int X;

    [HorizontalGroup]
    public int Y;
}