MinMaxSliderAttribute

Draw a special slider the user can use to specify a range between a min and a max value.

Uses a Vector2 where x is min and y is max.

namespace Sirenix.OdinInspector
{
[AttributeUsageAttribute((AttributeTargets)384, AllowMultiple = False, Inherited = True)]
public sealed class MinMaxSliderAttribute : Attribute
}

Requirements

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector
Version: 1.0.5.0

Constructors

Definition Description
MinMaxSliderAttribute(float, float, bool) Draws a min-max slider in the inspector. X will be set to min, and Y will be set to max.

Properties

Return Type Definition Description
float MaxValue The max value for the slider.
float MinValue The min value for the slider.
bool ShowFields Draw float fields for min and max value.

Example

The following example shows how MinMaxSlider is used.

public class Player : MonoBehaviour
{
	[MinMaxSlider(4, 5)]
	public Vector2 SpawnRadius;
}