Inactivitytimer
- Last UpdatedFeb 19, 2025
- 2 minute read
The Inactivitytimer node is a utility node that can monitor user input inactivity.
-
If the user does not take any input action with keyboard, mouse, or other device for the defined interval time, an event is raised.
-
The inactivity event is sent just one time.
-
When the user completes an activity, the inactivity timer resets and monitoring restarts automatically.
Platform support
This node is supported on all platforms, except XR-Portable WASM platform.
|
XR-WIN |
XR-P-WIN |
XR-P-IOS |
XR-P-AND |
XR-P-WASM |
|---|---|---|---|---|
|
Full support |
Full support |
Full support |
Full support |
No support |
|
|
|
|
|
|
Code example
This is a code example for the Inactivitytimer node.
<Inactivitytimer name="inactive" duration="60" active="false"/>
Position
The Inactivitytimer node must be inside a context node, such as Context or Global.
Inactivitytimer fields
These are the fields for Inactivitytimer node. Only the node-specific fields are indicated, not fields obtained by inheritance.
Field inheritance: NodeBase > Inactivitytimer
|
Fields |
Type |
Use |
Default value |
Description |
|---|---|---|---|---|
|
active |
sbool |
Optional |
true |
Specifies whether the timer is active. |
|
duration |
sfloat |
Optional |
10 |
Sets the inactivity time duration. If user does nothing for longer than duration time, an inactivity event is raised. |
|
inactivity |
sevent |
Optional |
No default |
The event triggered when user does nothing for a period longer than duration. |
|
inactivityReset |
sevent |
Optional |
No default |
The event triggered when the inactivity timer is reset, either due to an internal reset or a modification to the reset field. |
|
inactivityTime |
sfloat |
Read Only |
0 |
Shows the current time of inactivity while the active field is set to True. |
|
reset |
sevent |
Optional |
Not set |
Resets the inactivity timer. |