changecontext
- Last UpdatedJan 18, 2024
- 2 minute read
Use the changecontext element to move from the current context to another context. It is used inside a command node.
Changing context raises an onEnter event on destination context node and onExit on original context node.
Platform support
This node is supported on XR-Windows platform only.
|
XR-WIN |
XR-P-WIN |
XR-P-IOS |
XR-P-AND |
XR-P-WASM |
|---|---|---|---|---|
|
Full support |
No support |
No support |
No support |
No support |
|
|
|
|
|
|
Code example
This is a code example for the changecontext statement.
<command name="select_dpi">
<changecontext context="set_dpi"/>
<setfield field="sound_3.start"/>
</command>
Position
The changecontext statement can be only inside a Command node node.
Fields
These are the fields for changecontext statement.
|
Fields |
Type |
Use |
Default value |
Description |
|---|---|---|---|---|
|
condition |
sstring |
Optional |
No default value |
Applies a condition to the function execution. |
|
context |
sstring |
Mandatory |
No default value |
The name of the destination context. |