diff --git a/addons/gif-importer/importer_plugin.gd b/addons/gif-importer/importer_plugin.gd index 80a639b4..d0213a5a 100644 --- a/addons/gif-importer/importer_plugin.gd +++ b/addons/gif-importer/importer_plugin.gd @@ -78,7 +78,9 @@ func _import(source_file, save_path, options, platform_variants, gen_files): var animation_name = source_file.get_file().replace(".gif", "") var dir_name = base_dir + "/" + animation_name + "/" if DirAccess.dir_exists_absolute(dir_name): - DirAccess.remove_absolute(dir_name) + # 如果文件夹存在,就不再重新导入 + # 也就是说,重新导入的前提是删除 gif 同名文件夹 + return code DirAccess.make_dir_absolute(dir_name) var sprite_frames_path = base_dir + "/frames.tres" var sprite_frames: SpriteFrames