Toggle
Optional feature
Toggle 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 { ToggleComponent } from "mmpx";
const toggle = this.entity.TryGetComponent(ToggleComponent);Full API: ToggleComponent.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
Is OnisOn | boolean | true | |
Interactableinteractable | boolean | true | |
Checkmarkcheckmark | Entity | — | Shown while the toggle is on |
Groupgroup | Entity | — | An entity with a Toggle Group — its toggles are exclusive |