RangeAttributeclass

Mark this property as a ranged float/int. In inspector we'll be able to create a slider instead of a text entry.

objectAttributeRangeAttribute
Namespace
Sandbox
Assembly
Sandbox.System
Declaration
public class Sandbox.RangeAttribute : System.Attribute

Constructors3

Showing 3 constructors

Properties5

Showing 5 properties

public bool Sandbox.RangeAttribute.Clamped { get; set; }PUBLICGETSET

Whether or not the value should be clamped to the range. If false, the user can manually enter values outside the range if they wish.

Returns:bool

public float Sandbox.RangeAttribute.Max { get; set; }PUBLICGETSET

The maximum value of the range.

Returns:float

public float Sandbox.RangeAttribute.Min { get; set; }PUBLICGETSET

The minimum value of the range.

Returns:float

public bool Sandbox.RangeAttribute.Slider { get; set; }PUBLICGETSET

Whether or not a slider should be shown for this range.

Returns:bool

public float Sandbox.RangeAttribute.Step { get; set; }PUBLICGETSETOBSOLETE

Obsolete: Use [Step] attribute instead

Returns:float

On this page