Skip to content

fix: GameSettings.json EnableVRDeviceSimulator works in PC builds again (lost in the split) - #557

Open
BoroBongo wants to merge 1 commit into
developfrom
fix/build-vr-device-simulator
Open

BoroBongo wants to merge 1 commit into
developfrom
fix/build-vr-device-simulator

Conversation

@BoroBongo

Copy link
Copy Markdown
Contributor

What

PC builds can start with the keyboard/mouse device simulator again: "EnableVRDeviceSimulator": true in GameSettings.json / GameSettings.dev.json.

  • ConfigService.EffectiveEnableVRDeviceSimulator: the Editor uses DeveloperConfig.EnableVRDeviceSimulator; builds use the JSON key. Always off on mobile.
  • With the simulator on, a build stops XR (StopXRForSimulator), so a running headset/SteamVR doesn't drive the camera; mouse and keyboard own the rig. It also gets the seated default height and no spectator camera, as in the Editor.
  • GameSettings.json gets the key (false).

Why

Playtest: the key in GameSettings.dev.json did nothing in a fresh PC build. It was lost in the split: the experimental branch's 357996770 read it from the JSON in builds, but develop only had the DeveloperConfig flag, so the JSON key was ignored silently.

How to test manually

  • PC build, Gothic-Unity_Data/StreamingAssets/GameSettings.dev.json: "EnableVRDeviceSimulator": true. Start without the headset: the game shows in the window, WASD/mouse move the player, Q/E + mouse move the hands (F1 shows the simulator help).
  • Same with SteamVR/the headset running: the window shows the game, the headset doesn't move the camera.
  • Set it back to false: the build starts in VR as before.
  • Editor: DeveloperConfig.EnableVRDeviceSimulator still decides there.

Save/load

No new state.

Known gaps / follow-ups

  • None known.

…ia GameSettings.json "EnableVRDeviceSimulator" (lost in the split)

The experimental branch's 3579967 read the flag from GameSettings(.dev).json in builds; develop only had DeveloperConfig's, so the JSON key was ignored silently. ConfigService.EffectiveEnableVRDeviceSimulator: Editor DeveloperConfig, builds the JSON (never on mobile). With the simulator on, a build stops XR so a running headset/SteamVR doesn't drive the camera; seated default height, no spectator camera.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant