1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Clean up the XR editor logic

- Coalesce common logic into the `main` flavor to avoid duplication
- Code cleanup
This commit is contained in:
Fredia Huya-Kouadio
2025-01-16 09:40:30 -08:00
parent d33da79d3f
commit b4f25b1863
13 changed files with 86 additions and 214 deletions

View File

@@ -2840,6 +2840,13 @@ void EditorExportPlatformAndroid::get_command_line_flags(const Ref<EditorExportP
command_line_strings.push_back("--xr_mode_openxr");
} else { // XRMode.REGULAR is the default.
command_line_strings.push_back("--xr_mode_regular");
// Also override the 'xr/openxr/enabled' project setting.
// This is useful for multi-platforms projects supporting both XR and non-XR devices. The project would need
// to enable openxr for development, and would create multiple XR and non-XR export presets.
// These command line args ensure that the non-XR export presets will have openxr disabled.
command_line_strings.push_back("--xr-mode");
command_line_strings.push_back("off");
}
bool immersive = p_preset->get("screen/immersive_mode");