Version 2.1.0.0

Odin has a dedicated attribute overview with examples

IndentAttribute class

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector.Attributes
[DontApplyToListElements]
[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 sealed class IndentAttribute : Attribute, _Attribute

Indent is used on any property and moves the property's label to the right.

Use this to clearly organize properties in the inspector.

Inheritance
  • System.Object
  • System.Attribute
  • IndentAttribute
Example

The following example shows how a property is indented by Indent.

public class MyComponent : MonoBehaviour
{
	[Indent]
	public int IndentedInt;
}

Constructors

IndentAttribute(Int32)
Indents a property in the inspector.
public IndentAttribute(int indentLevel = 1)
Parameters
System.Int32 indentLevel

How much a property should be indented.

Fields

IndentLevel
Indicates how much a property should be indented.
public int IndentLevel

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.