Making things interactive
Add an Events component to an object and you can give it behaviour without writing anything.
Each event is one sentence: when this happens, do these things.
Building one
| Field | What it is |
|---|---|
| Name | for you — name events after what they do, not what they are on |
| Trigger | when it fires |
| State | for state triggers — which state to watch |
| Key | for key triggers — record the combination, with modifiers |
| Action id | for interface triggers — which button; empty means any |
| Steps | what happens, in order |
Steps are grouped into tabs (Actions, Animations, States) which is roughly "affect the outside world", "make something move", "change how something is".
Which objects a step affects
Every step has a target object. Leave it empty and the step acts on the object holding the event; fill it in and it acts on that object instead.
This is the part worth internalising: the event lives on one object, but its steps can act on any object. One event on a button can open a door, dim a light and start a sound somewhere else entirely.
What you can react to
Input (tap, hover, key, drag, pinch), the scene starting, the app pausing and resuming, AR tracking being found or lost, timers, proximity, state changes, collisions, interface buttons, and the character controller changing state.
The editor only offers triggers that make sense where you are — "marker detected" will not appear on a plain 3D scene.
A tap on an object also reaches its parents, so an event on a group catches taps on anything inside it. That saves putting the same event on forty objects.
The rest of how triggers travel, and what every one of them does, is in Events.
What you can do
The step list, grouped the way the tabs group it:
| Actions |
|---|
| Scene transition · Space transition · Open URL · Open messenger |
| Call phone number · Compose email · File download · Contact download |
| Show / hide object · Follow object · Look at object · Stop following |
| Fly along path · Stop path flight · Lock pointer · Release pointer |
| Animations |
|---|
| Play animation · Stop animation · Transformation · Opacity |
| Material · Bone transform · Built-in animation |
| States and logic |
|---|
| Set state · Override properties · If — otherwise · Set variable |
| Send signal · Wait, then |
Full detail, with every parameter: the step reference.
The if step holds a condition and two nested lists of steps. Because it is a step, it nests — an if inside an if gives you as many outcomes as you need.
Re-tracking
For AR scenes, each event's re-tracking mode decides what happens when the marker is lost and found again: start over immediately, never restart, or restart once the current steps finish.
Events, patches and scripts all hear the same triggers. Wiring the same trigger on the same object in two of them runs it twice. Pick one place for each.
Next: Animation Controller