UI Handle
Updated
Drag grip on a panel’s edge for moving it.
- Type
comp-ui-handle- Script class
UIHandleComponent- Per entity
- One
- Version
- 1.1.0
Read about it in Panels and layout: what it does, how to use it from a script, and examples.
Properties
Section titled “Properties”The props the runtime declares for this component, with their defaults and accepted ranges.
| Prop | Default | Range |
|---|---|---|
length |
0 ≤ x ≤ 16384 |
|
margin |
||
margin[] |
- |
|
radius |
0 ≤ x ≤ 16384 |
|
thickness |
0 ≤ x ≤ 16384 |
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
A draggable panel with a grip and a solid backAn inventory panel that a Behavior script makes draggable: a Grabbable, a UI Handle grip under it and an opaque UI Backdrop so it is not see-through from behind.
Drag the grip under the panel, or the panel itself, to move it. Drag the background to orbit round and see its solid back; scroll to zoom.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(UIHandleComponent); if (component) log(component.props);}