Seanba / Tiled2Unity

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

Warning: Rectangle has no width/height #185

Closed allandao closed 5 years ago

allandao commented 5 years ago

Hi, apologies if this is something that has already been answered.
Currently, I keep getting the following error when I open my .tmx files:
Command:
Opening C:\Users\allan\Desktop\Test Tilemap\streetlevel.tmx ...
Opening C:\Users\allan\Desktop\Test Tilemap\citytiles.tsx ...
Warning: Rectangle has zero width or height. Line 457

Opening C:\Users\allan\Desktop\Test Tilemap\Roguelike Tileset\rogueliketiles.tsx ...
Map details: { "streetlevel" size = 115x44, tile size = 16x16, # tiles = 2803 }
Parsed: C:\Users\allan\Desktop\Test Tilemap\streetlevel.tmx
Loading summary
Succeeded: 1
Parsed: C:\Users\allan\Desktop\Test Tilemap\streetlevel.tmx
Warnings: 1
Warning: Rectangle has zero width or height. Line 457

Errors: 0
--------------------------------------------------------------------------------
This also led to the issue from thread #182, or a missing prefab
I attempted to use SuperTiled2Unity without success either, but I am not sure what is wrong. Thank you for the help!

Seanba commented 5 years ago

Hi there, @allandao. That warning is telling you that you have a rectangle collider in your tileset that doesn't have a proper area. In other words, either its width and/or its height is set to zero. In that case Tiled2Unity tries to "guess" a proper width or height but I think it's something the user should be made aware of.

However, that shouldn't stop the prefab from being creating. I'm guessing there is something else wrong in the importing. Tiled2Unity is out of date with current Unity offerings though so I would imagine, eventually - maybe even now, it is no longer capable of making prefabs at all.

But SuperTiled2Unity is active and maintained. I'd be much more interested in learning why that isn't working for you. Please open a bug with some details there and I can help you out.

mtg-arken commented 4 years ago

i had the same problem and the file created in the prefab but when i move it to the unity i didnt how on the app it s show a blue screen on the game maps