Skip to content

Commit 18fd37d

Browse files
maunvzm4gr3d
authored andcommitted
Enable composition layer fallback in non-editor desktop player
1 parent 2303ce8 commit 18fd37d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/openxr/scene/openxr_composition_layer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ void OpenXRCompositionLayer::_bind_methods() {
192192
}
193193

194194
bool OpenXRCompositionLayer::_should_use_fallback_node() {
195-
if (Engine::get_singleton()->is_editor_hint()) {
195+
if (Engine::get_singleton()->is_editor_hint() || openxr_api == nullptr) {
196196
return true;
197197
} else if (openxr_session_running) {
198198
return enable_hole_punch || (!is_natively_supported() && !use_android_surface);
@@ -399,7 +399,7 @@ bool OpenXRCompositionLayer::get_alpha_blend() const {
399399
}
400400

401401
bool OpenXRCompositionLayer::is_natively_supported() const {
402-
if (composition_layer_extension) {
402+
if (composition_layer_extension && openxr_api) {
403403
return composition_layer_extension->is_available(openxr_layer_provider->get_openxr_type());
404404
}
405405
return false;

0 commit comments

Comments
 (0)