Range Attribute

Unity attribute to make a string be edited with a height-flexible and scrollable text area. You can specify the minimum and maximum lines for the TextArea, and the field will expand according to the size of the text. A scrollbar will appear if the text is bigger than the area available. Note: The maximum lines refers to the maximum size of the TextArea. There is no maximum to the number of lines entered by the user.

[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;

[PropertyOrder(4)]
public int Max = 100;