Ver Fonte

Enable composition layer fallback in non-editor desktop player

Mauricio Narvaez há 8 meses atrás
pai
commit
18fd37d4a8
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      modules/openxr/scene/openxr_composition_layer.cpp

+ 2 - 2
modules/openxr/scene/openxr_composition_layer.cpp

@@ -192,7 +192,7 @@ void OpenXRCompositionLayer::_bind_methods() {
 }
 
 bool OpenXRCompositionLayer::_should_use_fallback_node() {
-	if (Engine::get_singleton()->is_editor_hint()) {
+	if (Engine::get_singleton()->is_editor_hint() || openxr_api == nullptr) {
 		return true;
 	} else if (openxr_session_running) {
 		return enable_hole_punch || (!is_natively_supported() && !use_android_surface);
@@ -399,7 +399,7 @@ bool OpenXRCompositionLayer::get_alpha_blend() const {
 }
 
 bool OpenXRCompositionLayer::is_natively_supported() const {
-	if (composition_layer_extension) {
+	if (composition_layer_extension && openxr_api) {
 		return composition_layer_extension->is_available(openxr_layer_provider->get_openxr_type());
 	}
 	return false;