summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-09-12 09:25:46 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-09-12 09:25:46 +0200
commit55f1ae0d417501cee75143b28c2f07c4c02f8b11 (patch)
treeb20cf655d9547c643195f3d8a7fd79c79cf349e5
parent60ffa9645a29f0bb78c70045cd6d1178f01e9e47 (diff)
parent30a63396e5c6cceaac29b1e3e90dd08775c6b9cc (diff)
downloadredot-engine-55f1ae0d417501cee75143b28c2f07c4c02f8b11.tar.gz
Merge pull request #96868 from dsnopek/android-editor-launching-xr-app-fix
Fix launching XR apps from the Android editor
-rw-r--r--doc/classes/ProjectSettings.xml3
-rw-r--r--main/main.cpp1
-rw-r--r--modules/openxr/openxr_api.cpp4
3 files changed, 3 insertions, 5 deletions
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index e5b787714f..80a4ca9a8a 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -2950,9 +2950,6 @@
<member name="xr/openxr/enabled" type="bool" setter="" getter="" default="false">
If [code]true[/code], Godot will setup and initialize OpenXR on startup.
</member>
- <member name="xr/openxr/enabled.editor" type="bool" setter="" getter="" default="false">
- If [code]true[/code], Godot will setup and initialize OpenXR on editor startup.
- </member>
<member name="xr/openxr/environment_blend_mode" type="int" setter="" getter="" default="&quot;0&quot;">
Specify how OpenXR should blend in the environment. This is specific to certain AR and passthrough devices where camera images are blended in by the XR compositor.
</member>
diff --git a/main/main.cpp b/main/main.cpp
index af0d7b5804..9c9542325e 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -2550,7 +2550,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
// XR project settings.
GLOBAL_DEF_RST_BASIC("xr/openxr/enabled", false);
- GLOBAL_DEF_RST_BASIC("xr/openxr/enabled.editor", false);
GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "xr/openxr/default_action_map", PROPERTY_HINT_FILE, "*.tres"), "res://openxr_action_map.tres");
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "xr/openxr/form_factor", PROPERTY_HINT_ENUM, "Head Mounted,Handheld"), "0");
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "xr/openxr/view_configuration", PROPERTY_HINT_ENUM, "Mono,Stereo"), "1"); // "Mono,Stereo,Quad,Observer"
diff --git a/modules/openxr/openxr_api.cpp b/modules/openxr/openxr_api.cpp
index a19a75e722..73b6f6c1c9 100644
--- a/modules/openxr/openxr_api.cpp
+++ b/modules/openxr/openxr_api.cpp
@@ -273,7 +273,9 @@ Vector<OpenXRExtensionWrapper *> OpenXRAPI::registered_extension_wrappers;
bool OpenXRAPI::openxr_is_enabled(bool p_check_run_in_editor) {
if (XRServer::get_xr_mode() == XRServer::XRMODE_DEFAULT) {
if (Engine::get_singleton()->is_editor_hint() && p_check_run_in_editor) {
- return GLOBAL_GET("xr/openxr/enabled.editor");
+ // For now, don't start OpenXR when the editor starts up. In the future, this may change
+ // if we want to integrate more XR features into the editor experience.
+ return false;
} else {
return GLOBAL_GET("xr/openxr/enabled");
}