Allow to compile the engine without XR support

This commit is contained in:
Michael Alexsander
2025-02-24 20:37:51 -03:00
parent cc7a951140
commit aea559b39a
33 changed files with 77 additions and 57 deletions

View File

@ -46,7 +46,7 @@ const char *EditorBuildProfile::build_option_identifiers[BUILD_OPTION_MAX] = {
"disable_2d_physics",
"disable_3d_physics",
"disable_navigation",
"openxr",
"disable_xr",
"rendering_device", // FIXME: there's no scons option to disable rendering device
"opengl3",
"vulkan",
@ -82,7 +82,7 @@ const bool EditorBuildProfile::build_option_disable_values[BUILD_OPTION_MAX] = {
true, // PHYSICS_2D
true, // PHYSICS_3D
true, // NAVIGATION
false, // XR
true, // XR
false, // RENDERING_DEVICE
false, // OPENGL
false, // VULKAN

View File

@ -587,7 +587,7 @@ EditorRunBar::EditorRunBar() {
run_native->connect("native_run", callable_mp(this, &EditorRunBar::_run_native));
bool add_play_xr_mode_options = false;
#ifndef _3D_DISABLED
#ifndef XR_DISABLED
if (OS::get_singleton()->has_feature("xr_editor") &&
(XRServer::get_xr_mode() == XRServer::XRMODE_ON ||
(XRServer::get_xr_mode() == XRServer::XRMODE_DEFAULT && GLOBAL_GET("xr/openxr/enabled")))) {
@ -596,7 +596,7 @@ EditorRunBar::EditorRunBar() {
// either regular mode or XR mode.
add_play_xr_mode_options = true;
}
#endif // _3D_DISABLED
#endif // XR_DISABLED
if (add_play_xr_mode_options) {
MenuButton *menu_button = memnew(MenuButton);