From d320b92352032853420f652b9cdce1a2f0ee191c Mon Sep 17 00:00:00 2001 From: Fredia Huya-Kouadio Date: Sun, 4 May 2025 12:54:06 -0700 Subject: [PATCH] Enable XR play mode options in the regular editor The feature is necessary for XR projects with regular scenes, or hybrid app projects. --- editor/gui/editor_run_bar.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/editor/gui/editor_run_bar.cpp b/editor/gui/editor_run_bar.cpp index 7fccf0706e8..78daf42010e 100644 --- a/editor/gui/editor_run_bar.cpp +++ b/editor/gui/editor_run_bar.cpp @@ -599,10 +599,9 @@ EditorRunBar::EditorRunBar() { bool add_play_xr_mode_options = false; #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")))) { - // If this is the XR editor and openxr is enabled, we turn the `play_scene_button` and + if (XRServer::get_xr_mode() == XRServer::XRMODE_ON || + (XRServer::get_xr_mode() == XRServer::XRMODE_DEFAULT && GLOBAL_GET("xr/openxr/enabled"))) { + // If OpenXR is enabled, we turn the `play_scene_button` and // `play_custom_scene_button` into MenuButtons to provide the option to start a scene in // either regular mode or XR mode. add_play_xr_mode_options = true;