Skip to content

Commit c2ba0a8

Browse files
authored
Merge pull request #103869 from Bromeon/bugfix/openxr-editor-apis
Correctly register editor-only `OpenXR*` classes' `api_type`
2 parents 0d9237c + 9907153 commit c2ba0a8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/openxr/register_types.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,16 @@ void initialize_openxr_module(ModuleInitializationLevel p_level) {
227227
}
228228

229229
#ifdef TOOLS_ENABLED
230+
// Register as "editor", not "core".
231+
ClassDB::APIType prev_api = ClassDB::get_current_api();
232+
ClassDB::set_current_api(ClassDB::API_EDITOR);
233+
230234
GDREGISTER_ABSTRACT_CLASS(OpenXRInteractionProfileEditorBase);
231235
GDREGISTER_CLASS(OpenXRInteractionProfileEditor);
232236
GDREGISTER_CLASS(OpenXRBindingModifierEditor);
233237

238+
ClassDB::set_current_api(prev_api);
239+
234240
EditorNode::add_init_callback(_editor_init);
235241
#endif
236242
}

0 commit comments

Comments
 (0)