Skip to main content

Scrollbar

info
  • This class is only available in a Local environment

The Scrollbar class is a component which interacts with Unity Scrollbars on UI.

caution

The Scrollbar class is only compatible with TextMeshPro.

To get a Scrollbar from an item, use the GetComponent method.

let scrollbarComponent = item.GetComponent("Scrollbar")

You can then use the scrollbarComponent property to access the Scrollbar class.

Methods

Method NameReturn TypeParametersDescription
GetValuefloatnoneGets the current scroll value
SetValuevoidfloatSets the current scroll value
RegisterValueChangedvoidfunction(float)Registers an event for when the scroll value is changed
RemoveAllValuesChangedvoidnoneRemoves all events for when the scroll value is changed
GetColorBlockColorBlock?noneGets the ColorBlock for the element
SetColorBlockvoidColorBlockSets the ColorBlock for the element