Conversation
|
One thing I noticed when trying to load a tsx was the image path that the tsx referenced was being doubled up on For example In the assets directory the tileset image is saved as "maps/demo/TestTileTest.png" however, when loading, it attempts to load it from /maps/demo/maps/demo/TestTileTest.png resulting in the warning
The cause is on line 159 I am quite new to bevy so not sure if removing the join call will have unintended consequences but for the one map I loaded it seems to work fine. |
|
I have no interest in merging in new features to the tiled asset loader. My reasoning is that its outside of the scope of what this project is. The tiled examples primary function is only meant to be an example on how you could load in tiled data. Which is why its located in the example folder and not part of the crate itself. I'm more than happy to work with someone on creating a |
|
fyi I started a new crate and applied this PR to it. |
Workaround to support Tiles TSX tilesets files. When a TSX file extension is encountered in read_from that file will be read from the path and the bytes ignored.
Bevy gives a byte stream to the TMX file, when Tiled comes across a TSX dependency from that file it will try and read it from the same stream which results in the same TMX file being read. The Tiled crate does not yet support loading child dependencies separately.
Some discussion where I initially queried this as a bug, it was mentioned that Tiled may at some point be updated with Bevy in mind, until then we have this workaround. Works locally and I can access custom tile properties from the TSX tileset.
mapeditor/rs-tiled#265 (comment)