Identify unused extensions/resources

Is there any way to identify/locate unused extensions or resources throughout the game? I added multiple extensions/objects to my game and would like to remove those that are not used in any of the scenes/layouts.

1 Like

Resources? Yes. Just open the resources tab, right click on any resource within the list, then choose one of the “Remove all Unused” options.

Extensions? No. you’d just have to remove the extension that you’re sure you’re not using.

Thanks. Will that also remove the resource files from the game folder?

GDevelop will never delete files in your project folder (by design).

Once you’ve cleaned up your resources, if you really want to clean your folder, you can go to File > Save as, and save in another folder. Only files being used in the project and the resources tab will carry over.

hmm. Thanks!

What about the objects that were using those files BUT not used in the game? I presume they will not be deleted, but since their associated resource files are deleted they will show as blank image in the explorer. If that’s the case, it will be easier to identify and remove them as well.

The resource won’t be deleted if a object is using it as image.

That brings me back to the original question: “How to identify/locate unused extensions or resources throughout the game and remove them if they are not used in any of the scenes/layouts?”

In other words: What’s the easy way to delete all images in the resources explorer if the object using it is not being used in the game?

@TrinityNeo

About the extensions, you really should know if you are using or not an extension in your game, right?

Haha, not always. I often experiment with a lot of different extensions to see if they suit my needs. And if I go back to a game I haven’t worked on for a long time then I don’t know which ones I’m still using. Yes, if I had deleted them at the time that would be good, but things don’t always happen that way.

@Bubble: This is exactly the case with me. I have multiple extensions that I enabled for testing and now I would like to get rid of them if I am not using them. Unfortunately, there’s no easy to way to identify and delete those ones without risking my game :frowning:

What you’re describing is pretty standard for any programming or game dev project where you add in a utility (add-on in Unity, nodeJS module directly into PixiJS, etc) and then remove it later.

Unfortunately there’s not going to be a one-click solution if you delete extensions. Expressions that use them will show up as invalid (red squiggles) once you uninstall it. Actions/Conditions that are from extensions will change to “(Condition) from (Extension) is missing. Try installing it from the extension list” in the event editor, though. So you’ll definitely know what’s missing.

@Silver-Streak: Yes, I realized this the hard way. I have multiple invalid expressions throughout the game and I am trying to fix them.

Thanks for the tips!