Copying entire layers from tmx to tmx?

Is there a way to copy a layer from one tmx map to another map? Whilst retaining all it’s properties

I’m not aware of a GUI-based way that keeps the properties, but you can copy+paste the relevant code from one TMX file to another in a text editor. You’ll need to also change the layer’s ID (<layer id="##") so that it doesn’t match any existing layers and set the map’s nextlayerid to the largest current layer id +1, to make sure that subsequent layers made in the file are made correctly.

When doing it manually, you’ll also need to make sure the other map refers to the used tilesets and that they are using the same firstgid value.

I think it would in general be better to just do it in two steps, first copy the tiles or objects and then copy the properties (custom properties can be group-selected and copy/pasted all at once).

1 Like

I had no idea this was possible! In this case, copying the code seems like a waste of time, it would take longer than to just copy the tiles and then the properties.