UI panel
Updated
A world-space UI: a UI Panel root laid out as a column, two UI Labels and a UI Button whose press a script counts.
Press the button. Drag to orbit the camera, scroll to zoom.
UI panel
#pragma lifecycle(startup)
let presses = 0;
function startup() { const count = findEntity('Count').getComponent(UILabelComponent); on('counter/press', (event) => { if (event.eventType !== EventType.UIButton.Press) return; presses += 1; count.setProps({ text: `Pressed ${presses} ${presses === 1 ? 'time' : 'times'}` }); });}Open it in XR Creator
Section titled “Open it in XR Creator”Download the project file below, then import it in XR Hub with Projects › New › Import, as described in Projects and templates. It opens in XR Creator with the same scene you see running above, each script already attached to its Behavior entity. From there you can edit the scripts, adjust components and their props, preview your changes, and deploy the result as a world of your own.
UiPanel.xrproj