Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
VRSessionState
Represents the current state of the VR session managed by VRService. The engine updates VRSessionState each frame from the active session.
Items
| Name | Value | Description |
|---|---|---|
| Undefined | 0 | The VR session state is unknown or has not yet been established; the default value of VRSessionState. |
| Idle | 1 | The VR headset is connected and ready but is not yet presenting frames to the user. |
| Visible | 2 | The VR session is rendering frames visible to the user but does not yet have XR input focus; haptic feedback is available. |
| Focused | 3 | The VR session has full XR input focus and is rendering visible frames; haptic feedback is available. |
| Stopping | 4 | The VR session is in the process of stopping and will transition to an inactive state. |
Undefined
The VR session state is unknown or has not yet been established; the default value of VRSessionState.
| Field | Value |
|---|---|
| value | 0 |
Idle
The VR headset is connected and ready but is not yet presenting frames to the user.
| Field | Value |
|---|---|
| value | 1 |
Visible
The VR session is rendering frames visible to the user but does not yet have XR input focus; haptic feedback is available.
| Field | Value |
|---|---|
| value | 2 |
Focused
The VR session has full XR input focus and is rendering visible frames; haptic feedback is available.
| Field | Value |
|---|---|
| value | 3 |
Stopping
The VR session is in the process of stopping and will transition to an inactive state.
| Field | Value |
|---|---|
| value | 4 |