Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Slider

Creates a new instance of a Slider.
Read time 1 minuteLast updated 6 days ago

Definition

Slider()

Creates a new instance of a Slider.
public Slider()

Slider(float, float, SliderDirection, float)

Creates a new instance of a Slider.
public Slider(float start, float end, SliderDirection direction = SliderDirection.Horizontal, float pageSize = 0)

Parameters

start

The minimum value that the slider encodes.

The maximum value that the slider encodes.

The direction of the slider (Horizontal or Vertical).

pageSize

A generic page size used to change the value when clicking in the slider.

Slider(string, float, float, SliderDirection, float)

Creates a new instance of a Slider.
public Slider(string label, float start = 0, float end = 10, SliderDirection direction = SliderDirection.Horizontal, float pageSize = 0)

Parameters

label

The string representing the label that will appear beside the field.

start

The minimum value that the slider encodes.

The maximum value that the slider encodes.

The direction of the slider (Horizontal or Vertical).

pageSize

A generic page size used to change the value when clicking in the slider.