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.
public string LogLevel;
public string LogCategories;
// PC builds: the keyboard/mouse device simulator instead of a headset (the Editor uses DeveloperConfig's).
public bool EnableVRDeviceSimulator;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be in a user setting. Why do we want to have it? If you need it in a prod build, just add it inside GameSettings.asset directly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick one about why: I would like to have the main setting file super small for our gamers. A simulator is for devs and should not be a setting for them.

@JaXt0r

JaXt0r commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

@BoroBongo - If you don't really really really (desperately ;-) ) need it, I'd like to push back on this one. I removed it by design to have only the least settings in this file for our gamers only.

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.

2 participants