AI Dialog
Updated
The visible conversation interface of the agent.
- Type
comp-ai-dialog- Script class
AIDialogComponent- Per entity
- One
- Version
- 1.1.0
Read about it in Dialog and captions: 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 |
|---|---|---|
insetX |
- |
|
insetY |
- |
|
panelOffset |
||
panelOffset.x |
||
panelOffset.y |
||
panelOffset.z |
||
panel |
||
panel |
||
panel |
||
panel |
||
panelWidth |
320 ≤ x ≤ 960 |
|
pixelSize |
0.001 ≤ x ≤ 1 |
|
screenScale |
0.1 ≤ x ≤ 1 |
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
A standalone AI Dialog entity above a desk presents the conversation of a guide standing elsewhere in the room: its dialog names the agent by id.
The panel over the desk is Ada's conversation, though Ada stands across the room. Type a message to try it. Replies need the AI service, which this preview does not have: a message you send shows a short error in the panel instead. Drag outside the panel to orbit the camera, scroll to zoom.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(AIDialogComponent); if (component) log(component.props);}