Seanba / Tiled2Unity

Export Tiled Map Editor (TMX) files into Unity
Other
497 stars 120 forks source link

Tile2Unity Preview issue, cannot import functioning map. #137

Closed Nezara closed 6 years ago

Nezara commented 6 years ago

Hi There

Im brand new to Unity and Tiled so I was just following the typically tutorial on how to make 2D maps and import them into Unity. I got to the part where I go to Tiled2Unity, hit Help, then import "Unity Package to Project". I then tab back to Unity and allow the scripts to import, afterwards I prepare the final step of "Open Tiled Map", Preview (to check it all works) and then finally Exporting it as a Prefab to unity.

However In hitting preview I get nothing but a whole bunch of squares, nothing like what my map actually looks like and when I import it into unity, the map is visible in the Prefabs tab but will be invisible in the scene (regardless of position or how zoomed in or out I am).

I dont think iv missed a step...this is all pretty straight forward, I just have no idea what could be causing this issue or how to fix it

Issue in Previewer https://imgur.com/a/6vFuM

Issue in Unity itself (already imported in scene) https://imgur.com/a/ZvCGc

Seanba commented 6 years ago

Hi Nezara. Can you send me your TMX map (and tilset files and textures used by your map)? You can find my email on my blog: www.seanba.com

Nezara commented 6 years ago

Figured it out,

when you asked me to email it to you, it pointed me in the direction of something being wrong with the map itself. All my textures lined up and all layers were appropriately labeled...BUT the maps dimensions were on the default 100x100 and my tiled area was only 16x28....so it was way blown out. Not sure why I didnt work in unity (not visible regardless of how much I zoomed in or out) but once I adjusted the dimensions of the map to specifically fit my tiled area, it seemed to all work fine. Preview works, now I just need to test it in unity itself.

EDIT: All checks out, preview works correctly as does the map in Unity. There was a minute or two delay in loading the textures once it was placed but everything seems to work just fine now.