Centered Slider
The differences from a default slider:
zero at center
positive and negative parts have different scales.
Options
Value
intCurrent value.
Use Value Limits
boolValue cannot exceed the specified limits.
Limit Min
intMinimal limit of the value.
Limit Max
intMaximum limit of the value.
Value Min
intMinimal value.
Value Max
intMaximal value.
Step
intValue step.
Whole Number Of Steps
boolWhole number of steps for the value.
Handle
RangeSliderHandleHandle to drag.
UsableRangeRect
RectTransformUsable range.
FillRect
RectTransformGameObject to display fill (line from center to the current value).
Events
OnValueChanged
UnityEvent<int>OnChange
UnityEvent
Set value
slider.Value = 150;
Set display limits
slider.LimitMin = -500;
slider.LimitMax = 250;
Set value limits
slider.UseValueLimits = true;
slider.ValueMin = -100;
slider.ValueMax = 200;