Version 3.3.1.2

Odin has a dedicated attribute overview with examples

InlinePropertyAttribute 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, Inherited = false)]
[Conditional("UNITY_EDITOR")]
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