Skip to content

UI Menu Item

Updated

One entry of a UI Menu.

Type
comp-ui-menu-item
Script class
UIMenuItemComponent
Per entity
One
Version
1.0.0

Read about it in Controls: what it does, how to use it from a script, and examples.

Sent to the entity’s Signal Emitter as { entityId, eventType, data }. Compare eventType with the EventType constants.

  • UIMenuItem::select

Run it in the browser, read its scripts, and download it as an XR Creator project.

#pragma lifecycle(startup)
function startup() {
const component = self.parent.getComponent(UIMenuItemComponent);
if (component) log(component.props);
}