Enable composition layer fallback in non-editor desktop player

This commit is contained in:
Mauricio Narvaez 2025-01-10 13:40:27 -08:00 committed by Fredia Huya-Kouadio
parent 2303ce843a
commit 18fd37d4a8

View file

@ -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;