Skip to content

Toggle ​

UIScripts: ToggleComponentFeature: UI Controls (≈35 KB)

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 ​

FieldTypeDefaultDescription
Is On
isOn
booleantrue
Interactable
interactable
booleantrue
Checkmark
checkmark
Entity—Shown while the toggle is on
Group
group
Entity—An entity with a Toggle Group — its toggles are exclusive

© 2026 PlayAdGentic