Version 2.1.0.0

Odin has a dedicated attribute overview with examples

InlinePropertyAttribute class

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector.Attributes
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Property | AttributeTargets.Field, Inherited = false)]
public class InlinePropertyAttribute : Attribute, _Attribute
The Inline Property is used to place the contents of a type next to the label, instead of being rendered in a foldout.
Inheritance
  • System.Object
  • System.Attribute
  • InlinePropertyAttribute
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;
}
See Also
  • System.Attribute

Constructors

InlinePropertyAttribute()
public InlinePropertyAttribute()

Fields

LabelWidth
Specify a label width for all child properties.
public int LabelWidth