Delete and update sprite content

Hi guys!
I have noticed that when I change the content (a png image) of a sprite, the editor caches the old image in the editor. When I run the game the new image is shown but not within the GDevelop editor. Also I have noticed that when I export my game to a folder (a html5 game) it exports old images to the game folder, that are not in use anymore. How should I handle this? I want to see my new images in the editor and I don’t want unnecessary files that are not in use in my published game.

Thanks

Farid

1 Like

I usually restart GD when I changed a lot. For very few images, open them in piskel, saving not required

Thanks, I’ll try that next time I make changes :slight_smile:

//Farid

Go to the Resources tab. There you can right-click to remove unused resources.

1 Like

Perfect, that was just what I was hoping to find.

Thanks!

1 Like

Thanks for your help, this is exactly what I needed. I don’t know why deleted assets would still be listed in the resources tab but removing them from there made a massive improvement to my game’s loading time. It used to take 45-60 seconds to load, now it’s almost instant.

That is because you didn’t delete the assets. You deleted the objects or their references to the assets. The engine never deletes resource references from a project without you directly telling it to from the resources tab for safety reasons.

Note: even deleting it from the resources tab doesn’t delete the files from your project folder. You must do that directly for similar reasons to the above. Removing them from the resources tab DOES ensure they are not included in any exported game though.

1 Like