Hey, I’m having trouble importing a level over to unity when I put it in tiled2unity these are the errors I get:
TMX Exception Stack: at Tiled2Unity.TmxImage.FromXml(XElement elemImage, String prefix, String postfix)
at Tiled2Unity.TsxTileset.ParseTilesetXml(XElement xml, TsxTileset tileset)
at Tiled2Unity.TsxTileset.ParseTilesetSource(String tsxSource, TsxTileset tileset)
at Tiled2Unity.TsxTileset.FromXml(XElement xml, TmxMap tmxMap)
at Tiled2Unity.TmxMap.ParseAllTilesets(XDocument doc)
at Tiled2Unity.TmxMap.ParseMapXml(XDocument doc)
at Tiled2Unity.TmxMap.LoadFromFile(String tmxPath)
at Tiled2Unity.Session.LoadTmxFile(String tmxFilePath)
Hi there, @Ximithie.
If you can provide the full contents for the output I might be able to figure out what is going on. Tiled2Unity is old, however, and may not work with newer version of Unity. I would recommend switching over to SuperTiled2Unity instead as a start.
Thanks for replying @Seanba.
I tried SuperTiled2Unity and got this error after importing the tmx file I tried importing the .tsx file as well but just got more errors after that.
I recently updated SuperTiled2Unity to help identify when dependency errors like this take place. What version of SuperTiled2Unity are you currently on?
In any case: Your tileset file (and the textures it references) also need to be imported into Unity. Just make sure to keep the relative paths between your TMX, TSX, and texture files in place and you should be good to go.
A good rule of thumb is to open your TMX file in Tiled once you import it into Unity. If Tiled is complaining about not being to find files then you’ll have to same problem with SuperTiled2Unity.
I’m using 1.2.7, Also I imported a .tsx file which was needed into unity but still throws out an error.
Hi again. I just installed 1.2.7 to double-check and this is the kind of UI you should be getting when assets cannot be found …
You might want to delete your SuperTiled2Unity folder and re-install to make sure you have the latest. If you can copy and paste the errors you are getting then that will probably tell us what is going on.
Also, you may need to re-import your TMX once textures and TSX files have been imported. You can trigger that by making a change to your TMX file and resaving (in Tiled) or in Unity by right-clicking on the TMX file and selecting Reimport.
FWIW, version 1.3.0 of SuperTiled2Unity now makes it more obvious that you have to re-import your asset after dependencies has been resolved and gives you a button to do so.