Tiled2unityMac file XML

I just started using Tiled and Tiled2unityMac and I cant get the exporting to work. My map saves as a .tmx but from what I see the tiled2unity only takes .xml and when i change to xml i only get a white square. I have also tried tiled 1 and 2 but I can’t get I to work.

ps. I am following a video (https://www.youtube.com/watch?v=03-zRkJsoUw&list=PLiyfvmtjWC_X6e0EYLPczO9tNCkm2dzkm&index=7) but his tiled2unity is different.

Note that Tiled also allows saving maps as .xml, if the extension is really the problem here. The contents of the file will be the same.

That’s indeed a very old video. In the meantime, @Seanba has also released SuperTiled2Unity, which is rewritten from scratch and supersedes Tiled2Unity. You should upgrade if you can.

Hi there, @Melker_Klaar. Tiled2Unity takes your TMX file and, through a separate application, exports that TMX file into a specially-formed XML that the Unity-side scripts consume. It did a good enough job at the time but Unity now supports custom file assets through scripted importers, which is what SuperTiled2Unity is built on.

I recommend giving that a shot. All you should have to do is drag and drop your TMX, TSX, and texture files into Unity and your TMX file is turned into a Unity prefab. Just make sure that the relative paths between your map, tileset, and texture files is kept in-tact inside your Unity project. The inspector (in Unity) should alert you to problems along the way if you import into the wrong folder, for instance.

1 Like

I now have SuperTiled2Unity and have looked at how it works but when I try to implement my maps I get these messages and I don’t know how to fix it. The only one that I can seem to make work is the spritesheet.

46

30

It seems like you’re trying to import a tileset in Unity that refers to an image in your Downloads folder, which will not work according to @Seanba’s instructions.

The tileset image probably needs to be copied inside your Unity project file structure. You can open the .tsx file in Tiled and go into Tileset > Tileset Properties…, select the “Image” property and click the “Edit…” button that appears to change the image used by the tileset, so that it refers to the right location.

1 Like

It looks like you copied your TMX, TSX, and PNG all into the same folder but that breaks the relative paths between your TSX and PNG file.

@bjorn’s advice is solid but I would also add that you probably don’t want these files inside the SuperTiled2Unity folder. Treat that folder as an extra library and keep your own assets separate. It won’t break anything to have everything in the same folder but I consider it good housekeeping as SuperTiled2Unity is going to be updated over time. :slight_smile:

It works now thx for the help.

1 Like