Exporting XML from Tiled

Create issue
Issue #45 closed
Allyson Souza created an issue

I have searched for how to export XML from Tiled, and see that .tmx is a XML. But, X-UniTMX can't handle .tmx files when I try to define Map xml property in Tiled Game Map component. This can be more detailed in documentation.

I "saved as" in Tiled and typed .xml at the end of file name to save a xml. Set in the component and it works. Everything looks right, I've checked "Load this on awake?", placed my tile.png and tilemap.xml in the resources folder (at the same folder), but nothing happens.

I don't know what to do, because theres no feedback from the script, I just don't know how to start to debug this. Can someone help me?

Thanks

Comments (9)

  1. Nitneroc

    I couldn't really look at your issue for now, but you should give a look at the examples, they should get you running.

  2. Allyson Souza reporter

    Thank's for your reply, but I have followed each example and nothing works for me. I simple don't know why.

    I think maybe my xml files have something different from the examples, look:

    <terraintypes>
       <terrain name="Terra" tile="-1"/>
       <terrain name="Água" tile="-1"/>
       <terrain name="Pedra" tile="-1"/>
       <terrain name="Buraco" tile="-1"/>
       <terrain name="Grama" tile="-1"/>
      </terraintypes>
    

    All terrain names have the same tile number, it's correct? It's just something I think that could be wrong...

  3. Nitneroc

    It's different from the examples, but I guess the examples don't have terrain types defined, and this is perfectly normal (I don't see why terrain types should have a tileId).

    My english isn't that good and I'm not sure I understand what you mean. Do the examples work if you run them without touching them ? Are you running trunkDev or Unity2d version ? from my experience you should just go ahead and go to trunkdev version, it's stable enough for most features to be used (had some problems with ImageCollections, but I can help here if needed).

  4. Allyson Souza reporter

    Sorry, my english is not so good too.

    The examples works perfectly, but if I try to make my terrain changing the examples, or make my terrain from scratch, they don't work, don't give me an error... Just nothing happens.

    I'm using Unity Free 4.3. I'll make some more tests, and see what happens. Thanks for the attention.

  5. Nitneroc

    Ok, thanks for those explanations !

    Have you tried modifying slightly the example maps ? Have you tried creating a unity project from scratch but loading an example map ?

    The only error that comes to my mind is how you imported the tilesheets : are they sprites (not textures) ? set pixel to unit value to your tile width/height

  6. Guilherme Augusto Almeida Filo Maia repo owner

    Hey Allyson, currently X-UniTMX does not reads any Terrain information. And you can just save your map as .xml, does not need to export it. If you click on "Import as static Tile Map" in the Tiled Map Component inspector, what's the output in the console?

    If you want, you can send me your project and I can try to figure out what's happening.

  7. Log in to comment