Core: Handle disabled class detection in ClassDB

This commit is contained in:
Thaddeus Crews
2025-06-29 12:36:16 -05:00
parent 21fbf033f7
commit 555e7ad073
13 changed files with 62 additions and 52 deletions

View File

@ -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();
}