Property Range Attribute

PropertyRange attribute creates a slider control to set the value of a property to between the specified range. This is equivalent to Unity's Range attribute, but this attribute can be applied to both fields and property.

[Range(0, 10)]
public int Field = 2;

[InfoBox("Odin's PropertyRange attribute is similar to Unity's Range attribute, but also works on properties.")]
[ShowInInspector, PropertyRange(0, 10)]
public int Property { get; set; }

[InfoBox("You can also reference member for either or both min and max values.")]
[PropertyRange(0, "Max"), PropertyOrder(3)]
public int Dynamic = 6;

public int Max = 100;