Skip to content

Commit dfaac07

Browse files
committed
set CacheMode to ensure that small preview icons in filesystem view are updated after sprite sheet changes
1 parent 1a6676d commit dfaac07

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

addons/codeandweb.texturepacker/texturepacker_import_spritesheet.gd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func create_atlas_texture(sheetFolder, sprite, image, r_gen_files):
115115
var name = sheetFolder+"/"+sprite.filename.get_basename()+".tres"
116116
var texture
117117
if ResourceLoader.exists(name, "AtlasTexture"):
118-
texture = ResourceLoader.load(name, "AtlasTexture")
118+
texture = ResourceLoader.load(name, "AtlasTexture", ResourceLoader.CACHE_MODE_REPLACE_DEEP)
119119
else:
120120
texture = AtlasTexture.new()
121121

@@ -146,4 +146,6 @@ func read_sprite_sheet(fileName):
146146
var dict = JSON.parse_string(text)
147147
if dict == null:
148148
printerr("Invalid json data in "+fileName)
149+
150+
file.close()
149151
return dict

0 commit comments

Comments
 (0)