Core: Handle disabled class detection in ClassDB
This commit is contained in:
@ -70,7 +70,7 @@ static Node *gltf_import(const String &p_file) {
|
||||
|
||||
// Once editor import convert pngs to ctex, we will need to load it as ctex resource.
|
||||
Ref<ResourceFormatLoaderCompressedTexture2D> resource_loader_stream_texture;
|
||||
if (GD_IS_CLASS_ENABLED(CompressedTexture2D)) {
|
||||
if constexpr (GD_IS_CLASS_ENABLED(CompressedTexture2D)) {
|
||||
resource_loader_stream_texture.instantiate();
|
||||
ResourceLoader::add_resource_format_loader(resource_loader_stream_texture);
|
||||
}
|
||||
@ -108,7 +108,7 @@ static Node *gltf_import(const String &p_file) {
|
||||
|
||||
ResourceImporterScene::remove_scene_importer(import_gltf);
|
||||
ResourceFormatImporter::get_singleton()->remove_importer(import_texture);
|
||||
if (GD_IS_CLASS_ENABLED(CompressedTexture2D)) {
|
||||
if constexpr (GD_IS_CLASS_ENABLED(CompressedTexture2D)) {
|
||||
ResourceLoader::remove_resource_format_loader(resource_loader_stream_texture);
|
||||
resource_loader_stream_texture.unref();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user