Files
engine/docs/en/xr/session.mdx
鹅叔 dc1a4793ed Docs: remove playgrounds (#2689)
* fix: doc typo
2025-05-23 17:24:53 +08:00

38 lines
1.3 KiB
Plaintext

---
order: 4
title: Session Manager
type: XR
label: XR
---
The session manager is subordinate to the XRManager instance, which you can access through `xrManager.sessionManager`.
## Properties
| Property | Type | Description |
| :----------------- | :------------- | :------------------------ |
| mode | XRSessionMode | (Read-only) Get the current session type |
| state | XRSessionState | (Read-only) Get the current session state |
| supportedFrameRate | Float32Array | (Read-only) Get the hardware-supported frame rate |
| frameRate | number | (Read-only) Get the hardware running frame rate |
## Methods
| Method | Description |
| :-------------- | :------------------- |
| isSupportedMode | Get whether the session type is supported |
| run | Run the session |
| stop | Stop the session |
> After entering an XR session, developers can run or stop the session at any time. It is important to note that this state does not affect the engine's `run` and `pause`.
```mermaid
flowchart TD
A[enter session] --> B[run]
B --> C[stop]
C --> D[run]
D --> E[stop]
E --> F[……]
F --> G[exit session]
```