mapeditor/tiled

Do you want to work on this issue?

You can request for a bounty in order to promote it!

"Remove Unused Tilesets" export option #3855

eishiya posted onGitHub

It is usually a waste of space and parsing effort to deal with unused Tilesets in production maps, but it may be useful to leave the references in the working files. To solve this issue, it would be great if Tiled had an export option that removed unused tilesets.

There's a script available to remove unused tilesets, but it doesn't fully solve the problem: it affects the working map as well, and Tiled scripting has no good way to only affect exports. The script could be modified to re-add the removed tilesets after the asset has been saved, but then the order of tilesets will be changed, and the order is important for some engines.

This was requested by mingw on Discord. Well, more accurately, they requested that Tiled should (provide the option to) remove unused tilesets automatically when tiles are removed. I think in practice this would be quite annoying, so I think an export option is better. If a user actually wants tilesets removed from their working map, the script linked above can be used to automatically remove tilesets on save, which should be less annoying than doing so whenever tiles are erased/replaced.


Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests