Slider
UIScripts: SliderComponentFeature: UI Controls (≈35 KB)
Optional feature
Slider is part of UI Controls. A build includes it only when a scene, prefab or script uses it — see Feature cropping.
From a script
ts
import { SliderComponent } from "mmpx";
const slider = this.entity.TryGetComponent(SliderComponent);Full API: SliderComponent.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
Interactableinteractable | boolean | true | |
Valuevalue | number | 0.5 | |
Min ValueminValue | number | 0 | |
Max ValuemaxValue | number | 1 | |
Whole NumberswholeNumbers | boolean | false | Steps of 1 |
Directiondirection | "left-to-right" | "right-to-left" | "bottom-to-top" | "top-to-bottom" | "left-to-right" | |
Handlehandle | Entity | — | Moved to the value along the track |
Fillfill | Entity | — | Shows the track up to the value |