Script documentation
Slider.cs in TinyGiantStudio.Text namespace
If anything except method names starts with a capital letter, it's a property.
Utility
Variables
CurrentValue
float
The current value.
CurrentPercentage
float
Returns the current value in percentage.
minValue
float
The minimum value allowed by the slider.
maxValue
float
The maximum value allowed by the slider.
autoFocusOnGameStart
bool
If set to true, the slider is focused on awake. The slider is scrollable with a keyboard when focused. If it is in a list, the list controls who to focus on.
interactable
bool
As the name suggests, if it isn't interactable nothing can interact with it and it gets ignored in a list.
directionChoice
int
0 is left to right
Methods
Focus (bool enable)
Changes the current focus state to the parameter.
Interactable ()
Sets slider to interactable
Uninteractable ()
Sets slider to uninteractable.
GetCurrentValueFromHandle ()
Updates the value of the slider according to position of the handle. Used by raycast selector to update the value after dragging handle.
Events
Variables
usePercentage
bool
If set to true, uses percentage value to evaluate Value Range Events.
valueRangeEvents
List<ValueRange>
Methods
ValueChanged ()
Calls events after value is changed.
NewValueRange ()
Creates new value range event
Visual
Variables
handle
SliderHandle
progressBar
Transform
progressBarPrefab
GameObject
background
Transform
backgroundSize
float
unSelectedHandleMat
selectedHandleMat
clickedHandleMat
disabledHandleMat
Methods
UpdateGraphic ()
SelectedVisual ()
UnSelectedVisual ()
ClickedVisual ()
DisabledVisual ()
UpdateBackgroundSize ()
Input
keyStep
float
Controls how fast the slider moves on input.
Last updated