Merge pull request #103869 from Bromeon/bugfix/openxr-editor-apis

Correctly register editor-only `OpenXR*` classes' `api_type`
This commit is contained in:
Rémi Verschelde 2025-03-12 23:17:44 +01:00 committed by GitHub
commit c2ba0a8646
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -227,10 +227,16 @@ void initialize_openxr_module(ModuleInitializationLevel p_level) {
}
#ifdef TOOLS_ENABLED
// Register as "editor", not "core".
ClassDB::APIType prev_api = ClassDB::get_current_api();
ClassDB::set_current_api(ClassDB::API_EDITOR);
GDREGISTER_ABSTRACT_CLASS(OpenXRInteractionProfileEditorBase);
GDREGISTER_CLASS(OpenXRInteractionProfileEditor);
GDREGISTER_CLASS(OpenXRBindingModifierEditor);
ClassDB::set_current_api(prev_api);
EditorNode::add_init_callback(_editor_init);
#endif
}