goto
- Last UpdatedFeb 19, 2025
- 2 minute read
The goto statement is used inside a Coroutine to instantly jump to a label statement position.
-
The goto can be conditional so it can be skipped.
-
It can be used inside a wait block of a Coroutine to exit the wait block itself and directly jump to a label position.
Platform support
This element is fully supported on XR-Windows, XR-Portable Windows, XR-Portable iOS, XR-Portable Android, and XR-P WASM platforms.
|
XR-WIN |
XR-P-WIN |
XR-P-IOS |
XR-P-AND |
XR-P-WASM |
|---|---|---|---|---|
|
Full support |
Full support |
Full support |
Full support |
Full support |
|
|
|
|
|
|
Code example
This is a code example for a goto statement.
<goto label=”aLabel” condtion=”[@aNode.aField]==aValue” />
Fields
These are the fields for a goto statement.
|
Fields |
Type |
Use |
Default value |
Description |
|---|---|---|---|---|
|
condition |
sstring |
Optional |
Not set |
Defines on which condition the goto has to be performed. |
|
label |
sstring |
Mandatory |
Not set |
A unique identifier for the label to jump to. |