Closed RossBrunton closed 2 years ago
As far as I can tell, the format for .tmx does not require the nodes to be in a specific order.
It does, but it isn't documented. One second.
See https://github.com/mapeditor/rs-tiled/pull/135#discussion_r801650701. This is expected.
- In one of the test .tmx files, move the element after a element. For example:
Just wondering, but why would you do such a thing?
I do need to remember to put a note about this in the documentation...
To reproduce:
As far as I can tell, the format for .tmx does not require the nodes to be in a specific order.
This is caused because nodes are parsed as we see them. When generating the tiles in a TileLayer, the list of already parsed tilesets is looked up to figure out which should be used. If this list is empty (if no tileset node is seen yet) or contains no elements for which
first_gid < gid
, it is interpreted as the tile being "empty" as if it were GID 0.