A static class in Root.Township, the global namespace.
Static helper that works out the player mode (Quest, Pico, OpenXR, OpenVR, Fly and so on) from the platform, an override and the command line.
Fields
2 private and internal fields
| Member | What it is |
|---|
private static PlayerMode current | Cached mode worked out on first read. |
private static readonly IEnumerable<PlayerMode> forbiddenSaveModes | AutoCam and Fly. |
Properties
| Member | What it is |
|---|
static PlayerMode OverrideMode { get; set; } | Mode forced by code. Wins over everything except the Android platform check. |
static PlayerMode PlayerMode { get; } | The current mode: Quest or Pico on Android, then OverrideMode, then the cached value, then /fly or the XR mode from the command line. |
Methods
| Member | What it is |
|---|
static bool IsNormalPlayerMode(PlayerMode playerMode) | False for AutoCam and Fly, which are modes that shouldn't be saved. |
2 private and internal methods
| Member | What it is |
|---|
private static PlayerMode GetEditorMode(PlayerMode input) | Returns the input unchanged in this build. |
private static bool TryGetPlayerModeForAndroid(out PlayerMode playerMode) | Picks PicoXR or MetaQuest from the platform. |