mirror of
https://github.com/godotengine/godot.git
synced 2025-03-19 23:53:32 +08:00
Merge pull request #86209 from YuriSizov/main-fix-editor-only-module-classes
Correctly register editor-only module classes with the API
This commit is contained in:
commit
30e77a6321
@ -52,8 +52,13 @@ void initialize_minimp3_module(ModuleInitializationLevel p_level) {
|
||||
ResourceFormatImporter::get_singleton()->add_importer(mp3_import);
|
||||
}
|
||||
|
||||
ClassDB::APIType prev_api = ClassDB::get_current_api();
|
||||
ClassDB::set_current_api(ClassDB::API_EDITOR);
|
||||
|
||||
// Required to document import options in the class reference.
|
||||
GDREGISTER_CLASS(ResourceImporterMP3);
|
||||
|
||||
ClassDB::set_current_api(prev_api);
|
||||
#endif
|
||||
|
||||
GDREGISTER_CLASS(AudioStreamMP3);
|
||||
|
@ -48,8 +48,13 @@ void initialize_vorbis_module(ModuleInitializationLevel p_level) {
|
||||
ResourceFormatImporter::get_singleton()->add_importer(ogg_vorbis_importer);
|
||||
}
|
||||
|
||||
ClassDB::APIType prev_api = ClassDB::get_current_api();
|
||||
ClassDB::set_current_api(ClassDB::API_EDITOR);
|
||||
|
||||
// Required to document import options in the class reference.
|
||||
GDREGISTER_CLASS(ResourceImporterOggVorbis);
|
||||
|
||||
ClassDB::set_current_api(prev_api);
|
||||
#endif
|
||||
|
||||
GDREGISTER_CLASS(AudioStreamOggVorbis);
|
||||
|
Loading…
x
Reference in New Issue
Block a user