Hey, I'm having some issues with the custom sorting axis. I followed all directions to a T, values are x0 y1 z0, custom sorting layer is selected, etc. But this is happening - https://gfycat.com/scentedwiltedkrill
This may be more of a Unity thing, but I'm not sure how to deal with colliders in 2D in top down, is there a way to "layer" colliders? When you go up stairs, it activates X colliders, when you go down the stairs, it activates others? As shown in this gif here - https://gfycat.com/heavyacrobaticlhasaapso
Hi there, @aricl. It looks like your character is sorting against those trees as I would expect. The problem is that those trees are made up of separate tiles. What you want is for your character's root position (at his feet I guess?) to always sort against the bottom of the tree. If you change your tree tiles so that they are twice as tall then it should work. Note that this is what the example that comes with SuperTiled2Unity does.
As for your second question that is more of a Unity issue. My advice is to get your collisions working as desired without using ST2U first (i.e. just using stock colliders). Once that is working to taste then you can take the lessons learned from that and apply that to your maps exported from Tiled.
Hey @Seanba . Any updates? I have a jam to submit due in 7 days. would love some advice as to why the map disappears when dragging past a certain value. thanks
My guess is that the map is being culled. I took a look on the Unity forums and see that other people are running into similar issues with Unity Tilemaps, which SuperTiled2Unity uses.
Try going to one of the Tilemap Renderer components on one of your layers in the map and play with the chunk culling values to see if that makes a difference. You want a culling size that large enough that it won't be culled out. If that "works" then perhaps you can add a custom importing script that will help set those values for you automatically.
In any case it sounds like a Unity bug. They won't be able to fix in time for your jam but when you have time it would be good to enter a bug with them. There's probably something special about objects that are part of a canvas that is failing to automatically update the bounding chunks. What is your runtime target? It could be a bug there too.
Hey Seanba. We spoke on Twitter. I fixed the issue by setting Detect Chunk Culling Bounds to Auto in my Tile Layer. Thanks for the speedy response on Twitter
Hey @Seanba I have a Screen Space Camera Canvas in my Unity game. When I drag my Tiled Map in using SuperTiled2Unity, it seems to disappear if I move past a certain value. It shows in the Editor but not in Runtime.
Hi there. It's a bit dated now and uses an older version of SuperTiled2Unity but this Github repository is an example of ST2U using normal maps that should be helpful. https://github.com/Seanba/ST2U_NormalMaps
Hi there, Sam. SuperTiled2Unity does not use Unity's TilemapCollider2D class but instead uses its own collection of PolygonCollider2D objects to help with collision. This is so we can use the collision geometry created on the tilesets within Tiled.
There is an example provided with SuperTiled2Unity that should give some clues. Thanks.
Hey I used SuperTiled2Unity in 2020.1. When, I Import a "Tiled" file then it has no animation. In "Tiled" it looks fine with all animation, but in Unity its not animated! So i started the example map but its totally black, only the Player is visible. Did I do something wrong with the animated tiles?
Hi there, nova234. The animations don't work until the user presses "play" in the editor. Is that perhaps the issue? Are there any errors generated in the Console window in Unity?
Hey there, Seanba. Thanks for the reply. Programming is like magic a failure comes and mystically disappears. I slept overnight and its now working. I don't know why. Thanks Seanba for your Time.
HI, does anybody know how to I instantiate a tiled map via code? I am trying and nothing.... Also I am using the light system made by unity to iluminate 2d games, does it work along with this?
Hi there, marcospdsf. You should be able to instantiate the prefab created by the Tiled map importer the same you would any other prefab. (Note that most users just drag the prefab into their scene hierarchy though.) Are you getting any errors?
I need to store it in a variable, Wich I don't know the type, like is it a Image, a GameObject, or there is something like SuperTiled, need to call any method or import anything? The to instantiate, is it just instantiate(gameobject-tiled-image)?
I already tried some of those, but it didn't let me use, obviously 'cause it thinks it is not the type.
The prefab should be able to be stored or referenced as a GameObject like other prefab instances. It's possible I'm not understanding you fully, however, so it may be best to send me your project and point me to the code that is attempting the instantiation. (sean@seanba.com)
This is a very useful and simple to use plugin, I like it ! Keep up with the good work !
Nevertheless, I have a problem trying to write a custom importer. I asked the question on StackOverflow but I thought I'll post it here in case someone else could try to solve my problem or to help others that face the same issue when the problems will be solved.
Hi there. I've replied to your stack overflow post but it looks like you have your own assembly definition that is not set up correctly. It is going to need references to the SuperTiled2Unity and SuperTiled2UnityEditor assemblies.
Hey Seanba, sorry to bother you again! I'm working with a 2D light System (http://tiny.cc/sphpnz) and I need boxed collision polygons to be generated not triangulate to generate dynamic shadows properly. Can SuperTiled2D generate these kind of colisions without the triangules (check picture). Thanks again for your awesome tool! Be safe.
What a wonderful tool. Quick question about sorting: If I import two walls, each made up of tiles, and one is above another on the Y axis, the custom sort order seems to make my character always show on top of the bottom wall, and below the top wall. Is unity using the Y axis of the wall layer - where the walls are - rather than each wall's Y coordinate for sorting?
Changing the mode to individual didn't fix things either, as now my character shows in front/behind of individual wall tiles. Any help is appreciated.
Also, let me know if you have a donation page. Thank you!
Hey, I was wondering if you could help me fix this issue when I try to paint on the imported tilemap, for some reason the tile is not centered on the pixel and it's off to the down left side of the pixel.
First of all ty for this awesome tool. I'm having troubles to import an isometric map. Maps perfect placed in tiled but when I export to unity the layers messed up (worst when I click play). Can you help me please? Images attached.
Hi there, @mmztech. What are you using for the "Layer/Object Sorting" on your map? With an isometric map you're going to need to use a "Custom Sort Axis". This will also require you to set your Transparency Sort Mode in your Graphics setting as well.
Great tool! I much prefer it to Unity's tilemap tools.
I have one question:
My Tiled tilemap is set to "right-up", however when I import my tilemap to Unity, everything seems to work as "right-down" by default, and all my tiles have negative Y positions. Is there a way to change this behaviour?
Hi there, @halfcut. Unfortunately Tiled and Unity use different coordinate systems so I picked the solution that I hoped was the best case given what we have to work with. I wanted to keep the top-left corner of a map the "origin" but that did force my hand for maps to go down the negative Y axis. :/
Hi! Way to make life so easy for everyone! Thanks so much for the generous application. Just a quick question. Say I make a map with some collisions in Tiled. And then I import it into Unity. It isn't the right size so I manually resize the map to fit my sprites. And then I adjust the camera, and all is well. But then I go back into Tiled and decide to add a new section to the map. So I resize the map to double in size. And then I add a bunch more collisions. And then save all the files, overwriting the pre-existing ones. Now as far as I can figure out, I have to reimport it all into Unity again, resize it all, and fix the camera once again. I just want to streamline it so I don't have to take 5 minutes fixing everything every time I make a change to the tile map or tile sets.
There is probably a simple solution right in front of my eyes, but I haven't been able to figure it out yet even after looking through some of the documentation. I found the "Reimport Tiled Assets" button in the settings, that sounds like it would help but it seems to have done nothing.
Hi there, jets1234. Sorry for the late reply. For future reference issues like this are much more visible to me on my Github page.
There is indeed a simple solution for the size of your maps: Whatever Pixels Per Unit setting you are using for your sprites must be used for your tilesets and maps too.
You can set PPU on a per-map or per-tileset basis or you can change them for every asset in your project in the project settings ...
Camera settings are another story though. It sounds like you're trying to auto-fit your camera every time you resize your map (that isn't common, I think)? For that you're going to have to write some custom scripts for your camera.
hey there! I just wanted to thank you for everything youve done and for keeping the proj alive. I know too well how much of a pain it is to maintain a tool. Again, thank you for what you've done for everyone. Cheers!
I am using LightweightRenderPipeline and 2D Renderer to achieve 2d lighting on sprites. How can I apply this to my tmx imported maps so that they receive light?
I can no longer attach a Sprite Renderer, which is the crucial component to receive lighting.
I figured it out. You have to select all the image layers in the .tmx map, drag and drop SpritesLitDefault on all of them as Material, then set Target Sorting Layers to the correct one. Then add a 2D Point Light and set Target Sorting Layers to the right one as well! Working great.
Hi there, Christopher. I'm glad you got it working. BTW, I recommend you make the assignment of material and sorting layer part of your pipeline through a custom importer. That will save you from having to make any additional changes to your map prefabs after they are imported by ST2U.
You can see and example of a custom importer in action in this repository. It will take a little bit of code on your part to get what you want but it's really nice when your maps "just work" automatically. :)
I'm running into the same issue as Christopher, but I cannot fix it manually as he did because ST2U resets all of my materials back to default every time I reload Unity. I'm attempting to set up a custom importer as you suggested, but so far as I can tell, tilemap renderers cannot be found via getcomponent. How would you suggest changing the material of each tilemap renderer? Or even just a way to make ST2U stop changing my materials would be very helpful! Thanks!
Hi there, Mixxy92. I'm finding that when I have my project set up to use the LWRP with a 2D Renderer that the all Tilemap Renderers and Sprite Renderers are automatically using the Sprite-Lit-Default material. Are you not getting that? (I'm using 2019.2.6f1 btw)
You know, its the strangest thing. I made a custom importer but had literally no code in the importer. But when I changed the tmx files to use the (empty) custom importer, they all changed over to the sprite-lit-default for whatever reason. I can't explain it but as long as it continues working I'm content with it!
BTW, in the Project Settings for SuperTiled2Unity you can assign the default material that you want all your Tilemap and Sprite renderers to use so for most people this will be the easiest/best way to use a custom material.
If you want sometime a bit more complicated like, say, different materials for different Tiled layers then you'll want to use a custom importer.
Hey! I would suggest after applying the proper lighting to your .tmx map, from your Inspector, drag the imported Tiled Map into a folder in Assets as a Prefab. This worked for me pretty well, but I'm sure Seanba's suggestion is better! 😊Can't wait for a release soon. Good luck everyone.
Just updated to version 1.5.3 and every time I try to make a change to my levels unity crashes.
Also can you please make a discord so people using your tools can communicate with each other just in case they have the same issue and we don't have to wait for a response please.
I'd probably also want to look at your project to see if I can replicate the problem. If that isn't possible (which is understandable) then a small project that does have the bug would be useful.
I'm not sure how helpful having a Discord server would be but I'm open to trying it out. Here's an invite: https://discord.gg/48KsnG
Someone was reporting a similar crashing issues when using Unity 2018.3. I was able to replicate and put a fix in the latest version of SuperTiled2Unity (1.5.4). Hopefully this fixes the problem for you as well.
Thanks. I ran into a problem at first, but after reading below I found out that my files needed to all be in the same folder, and also that it requires Tiled to save it to that folder to resolve the path. So all is good now!
I'm experimenting with the prefab replacement feature. I'd like to be able to replace an object with my prefab but retain the collision geometry as it is. ST2U creates a BoxCollider2D, PolygonCollider2D, or EdgeCollider2D based on the geometry but this collider is lost when the object is replaced with my prefab.
I don't think there's a natural way to merge the colliders into a prefab that would work for everyone, so what I'm hoping is for a way to hook a script to the TMX import. There I could transfer the collider geometry into my prefab. Does such a hook exist already?
Hi there, Armakuni. This is exactly the kind of thing you would use a Custom Importer for. It's a script you can attach to the importer process to do extra work on your TMX prefab just before the import completes.
Is not working do not trust in this tool I was very reasonable to donate but I would not many errors to import do not resize as well in unity everyone try to use the tile palette in unity is hard pain of butt is the only way to get a fast workflow.
Like I've told you before there is a trivial solution to the problem you were having. Unity has the concept of "Pixels Per Unit" that is used for textures, sprites and tilemaps. SuperTiled2Unity also supports this functionality. All you need to do is make sure you are using the same "Pixels Per Unit" value for your Tiled maps and tilesets.
By default, Unity prefers values of 100 because that works well with their 2D physics systems. Personally, I use a value of 1 so that 1 unit is 1 pixel. YMMV.
If the issue persists then report a bug on my GitHub page and I will look at it further.
Keep in mind this is a project I do in my spare time and make freely available for others. Your aggressive attitude is misplaced even if you did make a donation.
I may not be using Tiled correctly with SuperTiled2Unity but I am getting this error on the Tiled map file:
"SuperTiled2Unity version: 1.4.6, Unity version: 2019.1.0f2 Errors detected in tileset 'Map_Tileset.tsx'. Check the tileset inspector for more details. Your map may be broken until these are fixed. Could not find tile 63. Make sure the tilesets were successfully imported. Could not find tile 6. Make sure the tilesets were successfully imported. Could not find tile 3. Make sure the tilesets were successfully imported. Could not find tile 4. Make sure the tilesets were successfully imported. Could not find tile 5. Make sure the tilesets were successfully imported. Could not find tile 60. Make sure the tilesets were successfully imported. Could not find tile 61. Make sure the tilesets were successfully imported. Could not find tile 62. Make sure the tilesets were successfully imported. Could not find tile 117. Make sure the tilesets were successfully imported."
I'm also getting this error on the Map_Tileset.tsx file even though the roguelikeSheet_transparent.png is in that spot:
I have a small question about the pivot point of the sprites when they are imported in Unity. We have a rock sprite and when it is imported in Unity, it looks like the pivot point is placed at the very bottom left. The problem is that we absolutely need to be able to change the position of that pivot point. We thought at first that changing the drawing offset in Tiled would also change the pivot, but it doesn't seem to work. Is there anyway to edit the pivot either in Tiled or in Unity (after importing everything)?
Hi there. SuperTiled2Unity puts the pivot point for Tile Objects at the bottom-left corner because that's what Tiled does.
If you need to manage the pivot point of a Tile Object then chances you want to control or manage other aspects of the object. In other words, it's now longer just a decorative tile on your level somewhere but tied into gameplay somehow.
In that case I'd recommend keeping your Tile Object in Tiled but use a "Prefab Replacement" so that those objects are replaced by a "proper" sprite (or some other object) that you have scripting control over.
First, thank you very much for this awesome tool and for the previous Tiled2Unity tool.
I have a game which runs perfectly fine with the previous Tiled2Unity code, but migrating to SuperTiled2Unity has made the instantiation of the map very slow (can take 6 seconds to instantiate the map).
I am intantiate the map from a tmx file using (the tmx is being loaded from an asset bundle):
Hi there, @adiohaion. I'd like to do some profiling on your project to try to understand what is going on there. Would you mind sending it my way? My email is sean@seanba.com. Thanks.
Hi again, sorry for the late response! I was able to fix it by upgrading to the latest unity version & latest SuperTile2Unity. I also instantiate the map now from a prefab (like we use to do in the previous Tile2Unity) instead of the tmx. Thanks again for the great library!
When I load a .TMX map file it is counted as a game object that I can put into the scene but has no picture. I even imported the tileset .TSX as well as the original sprite sheet but it stays blank! please I need help.
Hi there, PuppyQake. Check the Inspector for your TMX file. Are there any errors there? My guess is that your referenced tileset.tsx file is not in the proper location. (You have to keep relative paths between your TMX , TSX, and texture files)
Hi there, Dasimar, are your imported tilesets and PNGs in the locations they are expected? It looks like you may have imported them all to the same directory in Unity but they are expected to be in different directories.
Try opening your exported TMX file in Tiled. Is Tiled also complaining that it cannot find your PNG and TSX files?
(BTW, you can use Tiled to find those TSX and PNG files in their new relative locations.)
i'm unfortunately having the same issue. i love tiled but can't for the life of me get it to integrate into unity. i've tried saving all my files in a multitude of different directories yet i just can't seem to figure it out. step by step tutorials online are non existent or don't show how/where they save their tiled projects/tmx/png files. if there is any way to see a step by step process from absolute beginning to end (starting a tiled project, where to import from, where to save files and finally where to export for integration with unity) would be incredibly appreciated. i've gone around so many times that at this point i've only confused myself.
I'm sorry that some people are having difficulty with this. I assumed relative paths between TMX, TSX, and textures would be a straightforward concept for people making games although I concede that Unity assets don't normally have these restrictions.
The easiest thing to do, before you do anything with Unity, is have your Tiled map and all other files it references (tilesets and textures) all live in the same folder on your harddive somewhere. Then, drag that folder into your Unity project in one go.
← Return to tool
Comments
Log in with itch.io to leave a comment.
Hey, I'm having some issues with the custom sorting axis. I followed all directions to a T, values are x0 y1 z0, custom sorting layer is selected, etc. But this is happening - https://gfycat.com/scentedwiltedkrill
This may be more of a Unity thing, but I'm not sure how to deal with colliders in 2D in top down, is there a way to "layer" colliders? When you go up stairs, it activates X colliders, when you go down the stairs, it activates others? As shown in this gif here - https://gfycat.com/heavyacrobaticlhasaapso
Thank you!
Hi there, @aricl. It looks like your character is sorting against those trees as I would expect. The problem is that those trees are made up of separate tiles. What you want is for your character's root position (at his feet I guess?) to always sort against the bottom of the tree. If you change your tree tiles so that they are twice as tall then it should work. Note that this is what the example that comes with SuperTiled2Unity does.
As for your second question that is more of a Unity issue. My advice is to get your collisions working as desired without using ST2U first (i.e. just using stock colliders). Once that is working to taste then you can take the lessons learned from that and apply that to your maps exported from Tiled.
Thanks a bunch for the reply. I didn’t know using different sized tiles was a thing I could do!
Hey @Seanba . Any updates? I have a jam to submit due in 7 days. would love some advice as to why the map disappears when dragging past a certain value. thanks
My guess is that the map is being culled. I took a look on the Unity forums and see that other people are running into similar issues with Unity Tilemaps, which SuperTiled2Unity uses.
https://forum.unity.com/threads/tilemap-chunk-culling-bounds-confusion.537268/
https://forum.unity.com/threads/disappearing-chunks-on-tilemap.681136/
Try going to one of the Tilemap Renderer components on one of your layers in the map and play with the chunk culling values to see if that makes a difference. You want a culling size that large enough that it won't be culled out. If that "works" then perhaps you can add a custom importing script that will help set those values for you automatically.
In any case it sounds like a Unity bug. They won't be able to fix in time for your jam but when you have time it would be good to enter a bug with them. There's probably something special about objects that are part of a canvas that is failing to automatically update the bounding chunks. What is your runtime target? It could be a bug there too.
Hey Seanba. We spoke on Twitter. I fixed the issue by setting Detect Chunk Culling Bounds to Auto in my Tile Layer. Thanks for the speedy response on Twitter
Hey @Seanba I have a Screen Space Camera Canvas in my Unity game. When I drag my Tiled Map in using SuperTiled2Unity, it seems to disappear if I move past a certain value. It shows in the Editor but not in Runtime.![](https://img.itch.zone/aW1nLzUwMjg0OTgucG5n/original/024Rn3.png)
Is there anyway to add support for normal maps to this? I'd like to use normal maps from Sprite DLight on my tilemaps
Hi there. It's a bit dated now and uses an older version of SuperTiled2Unity but this Github repository is an example of ST2U using normal maps that should be helpful.
https://github.com/Seanba/ST2U_NormalMaps
Hey,
thanks for the tool :)
How do we report Bugs? Tilemap collisions do not work in Unity 2020.1.7 latest. Is this a missing feature or a bug?
Hi there, Sam. SuperTiled2Unity does not use Unity's TilemapCollider2D class but instead uses its own collection of PolygonCollider2D objects to help with collision. This is so we can use the collision geometry created on the tilesets within Tiled.
There is an example provided with SuperTiled2Unity that should give some clues. Thanks.
love tiled love unity
Hey I used SuperTiled2Unity in 2020.1. When, I Import a "Tiled" file then it has no animation. In "Tiled" it looks fine with all animation, but in Unity its not animated! So i started the example map but its totally black, only the Player is visible. Did I do something wrong with the animated tiles?
Hi there, nova234. The animations don't work until the user presses "play" in the editor. Is that perhaps the issue?
Are there any errors generated in the Console window in Unity?
Hey there, Seanba. Thanks for the reply. Programming is like magic a failure comes and mystically disappears. I slept overnight and its now working. I don't know why. Thanks Seanba for your Time.
HI, does anybody know how to I instantiate a tiled map via code? I am trying and nothing.... Also I am using the light system made by unity to iluminate 2d games, does it work along with this?
Hi there, marcospdsf. You should be able to instantiate the prefab created by the Tiled map importer the same you would any other prefab. (Note that most users just drag the prefab into their scene hierarchy though.) Are you getting any errors?
I need to store it in a variable, Wich I don't know the type, like is it a Image, a GameObject, or there is something like SuperTiled, need to call any method or import anything? The to instantiate, is it just instantiate(gameobject-tiled-image)?
I already tried some of those, but it didn't let me use, obviously 'cause it thinks it is not the type.
And I am really thankful for the answer
The prefab should be able to be stored or referenced as a GameObject like other prefab instances. It's possible I'm not understanding you fully, however, so it may be best to send me your project and point me to the code that is attempting the instantiation. (sean@seanba.com)
Just sent you a email, thank you :D
This is a very useful and simple to use plugin, I like it ! Keep up with the good work !
Nevertheless, I have a problem trying to write a custom importer. I asked the question on StackOverflow but I thought I'll post it here in case someone else could try to solve my problem or to help others that face the same issue when the problems will be solved.
Hi there. I've replied to your stack overflow post but it looks like you have your own assembly definition that is not set up correctly. It is going to need references to the SuperTiled2Unity and SuperTiled2UnityEditor assemblies.
Seanba are you ok man? No more reply since a long time, I hope you are right!
hello, sorry 4 bothering but i need to know how to export my tile as a tsx
thanks
Hey Seanba, sorry to bother you again! I'm working with a 2D light System (http://tiny.cc/sphpnz) and I need boxed collision polygons to be generated not triangulate to generate dynamic shadows properly. Can SuperTiled2D generate these kind of colisions without the triangules (check picture). Thanks again for your awesome tool! Be safe.
Hi,
What a wonderful tool. Quick question about sorting: If I import two walls, each made up of tiles, and one is above another on the Y axis, the custom sort order seems to make my character always show on top of the bottom wall, and below the top wall. Is unity using the Y axis of the wall layer - where the walls are - rather than each wall's Y coordinate for sorting?
Changing the mode to individual didn't fix things either, as now my character shows in front/behind of individual wall tiles. Any help is appreciated.
Also, let me know if you have a donation page. Thank you!
Hey, I was wondering if you could help me fix this issue when I try to paint on the imported tilemap, for some reason the tile is not centered on the pixel and it's off to the down left side of the pixel.![](https://img.itch.zone/aW1nLzMxNjYwMTkucG5n/original/oZI%2FcN.png)
It is a very usefull tool.But i have a strange problem to import an isometric map.I got X offset in Image Layer.I tried everything i can. like this:
Can i do with this something like this easy for more levels: https://mr-mohammad-rasoul.itch.io/survival-shooter-3fps-unity25d-webgl2
Can i change tsx dynamically in unity?
First of all ty for this awesome tool. I'm having troubles to import an isometric map. Maps perfect placed in tiled but when I export to unity the layers messed up (worst when I click play). Can you help me please? Images attached.![](https://img.itch.zone/aW1nLzMwMjg4NjguanBn/original/ZYOhFO.jpg)
Hi there, @mmztech. What are you using for the "Layer/Object Sorting" on your map? With an isometric map you're going to need to use a "Custom Sort Axis". This will also require you to set your Transparency Sort Mode in your Graphics setting as well.
Check this out for further details: https://supertiled2unity.readthedocs.io/en/latest/manual/sorting.html#dynamic-sorting-with-a-custom-sort-axis
I got it fixed, thank you very much for your time to reply! Take care there!
Thank you for this wonderful tool!
Great tool! I much prefer it to Unity's tilemap tools.
I have one question:
My Tiled tilemap is set to "right-up", however when I import my tilemap to Unity, everything seems to work as "right-down" by default, and all my tiles have negative Y positions. Is there a way to change this behaviour?
Hi there, @halfcut. Unfortunately Tiled and Unity use different coordinate systems so I picked the solution that I hoped was the best case given what we have to work with. I wanted to keep the top-left corner of a map the "origin" but that did force my hand for maps to go down the negative Y axis. :/
No problem. Thanks for clearing that up!
Hi! Way to make life so easy for everyone! Thanks so much for the generous application. Just a quick question. Say I make a map with some collisions in Tiled. And then I import it into Unity. It isn't the right size so I manually resize the map to fit my sprites. And then I adjust the camera, and all is well. But then I go back into Tiled and decide to add a new section to the map. So I resize the map to double in size. And then I add a bunch more collisions. And then save all the files, overwriting the pre-existing ones. Now as far as I can figure out, I have to reimport it all into Unity again, resize it all, and fix the camera once again. I just want to streamline it so I don't have to take 5 minutes fixing everything every time I make a change to the tile map or tile sets.
There is probably a simple solution right in front of my eyes, but I haven't been able to figure it out yet even after looking through some of the documentation. I found the "Reimport Tiled Assets" button in the settings, that sounds like it would help but it seems to have done nothing.
Thank you all in advance for any help.
Hi there, jets1234. Sorry for the late reply. For future reference issues like this are much more visible to me on my Github page.
There is indeed a simple solution for the size of your maps: Whatever Pixels Per Unit setting you are using for your sprites must be used for your tilesets and maps too.
You can set PPU on a per-map or per-tileset basis or you can change them for every asset in your project in the project settings ...
Camera settings are another story though. It sounds like you're trying to auto-fit your camera every time you resize your map (that isn't common, I think)? For that you're going to have to write some custom scripts for your camera.
hey there! I just wanted to thank you for everything youve done and for keeping the proj alive. I know too well how much of a pain it is to maintain a tool. Again, thank you for what you've done for everyone. Cheers!
Thanks, Jaacko!
Hi Seanba, thanks for your tool.
I am using LightweightRenderPipeline and 2D Renderer to achieve 2d lighting on sprites. How can I apply this to my tmx imported maps so that they receive light?
I can no longer attach a Sprite Renderer, which is the crucial component to receive lighting.
Thanks.
I figured it out. You have to select all the image layers in the .tmx map, drag and drop SpritesLitDefault on all of them as Material, then set Target Sorting Layers to the correct one. Then add a 2D Point Light and set Target Sorting Layers to the right one as well! Working great.
Thanks again!
Hi there, Christopher. I'm glad you got it working. BTW, I recommend you make the assignment of material and sorting layer part of your pipeline through a custom importer. That will save you from having to make any additional changes to your map prefabs after they are imported by ST2U.
You can see and example of a custom importer in action in this repository. It will take a little bit of code on your part to get what you want but it's really nice when your maps "just work" automatically. :)
I'm running into the same issue as Christopher, but I cannot fix it manually as he did because ST2U resets all of my materials back to default every time I reload Unity. I'm attempting to set up a custom importer as you suggested, but so far as I can tell, tilemap renderers cannot be found via getcomponent. How would you suggest changing the material of each tilemap renderer? Or even just a way to make ST2U stop changing my materials would be very helpful! Thanks!
Hi there, Mixxy92. I'm finding that when I have my project set up to use the LWRP with a 2D Renderer that the all Tilemap Renderers and Sprite Renderers are automatically using the Sprite-Lit-Default material. Are you not getting that? (I'm using 2019.2.6f1 btw)
You know, its the strangest thing. I made a custom importer but had literally no code in the importer. But when I changed the tmx files to use the (empty) custom importer, they all changed over to the sprite-lit-default for whatever reason. I can't explain it but as long as it continues working I'm content with it!
BTW, in the Project Settings for SuperTiled2Unity you can assign the default material that you want all your Tilemap and Sprite renderers to use so for most people this will be the easiest/best way to use a custom material.
If you want sometime a bit more complicated like, say, different materials for different Tiled layers then you'll want to use a custom importer.
Hey! I would suggest after applying the proper lighting to your .tmx map, from your Inspector, drag the imported Tiled Map into a folder in Assets as a Prefab. This worked for me pretty well, but I'm sure Seanba's suggestion is better! 😊Can't wait for a release soon. Good luck everyone.
Thank you for this, it helps a lot for work on my Unity projects (such as Distortion)
Just updated to version 1.5.3 and every time I try to make a change to my levels unity crashes.
Also can you please make a discord so people using your tools can communicate with each other just in case they have the same issue and we don't have to wait for a response please.
Hi there. Sorry you're having a problem with this but I of course do not expect a crash to occur when your map is being re-imported.
The best course of action for such issues is to open an issue on my GitHub page: https://github.com/Seanba/SuperTiled2Unity/issues
The first thing I'd like to look at is your Editor log. This link will help you find that on your OS: https://docs.unity3d.com/Manual/LogFiles.html
I'd probably also want to look at your project to see if I can replicate the problem. If that isn't possible (which is understandable) then a small project that does have the bug would be useful.
I'm not sure how helpful having a Discord server would be but I'm open to trying it out. Here's an invite: https://discord.gg/48KsnG
Someone was reporting a similar crashing issues when using Unity 2018.3. I was able to replicate and put a fix in the latest version of SuperTiled2Unity (1.5.4). Hopefully this fixes the problem for you as well.
Thanks. I ran into a problem at first, but after reading below I found out that my files needed to all be in the same folder, and also that it requires Tiled to save it to that folder to resolve the path. So all is good now!
Hello, Seanba!
I'm experimenting with the prefab replacement feature. I'd like to be able to replace an object with my prefab but retain the collision geometry as it is. ST2U creates a BoxCollider2D, PolygonCollider2D, or EdgeCollider2D based on the geometry but this collider is lost when the object is replaced with my prefab.
I don't think there's a natural way to merge the colliders into a prefab that would work for everyone, so what I'm hoping is for a way to hook a script to the TMX import. There I could transfer the collider geometry into my prefab. Does such a hook exist already?
Thanks for the excellent tool!
Hi there, Armakuni. This is exactly the kind of thing you would use a Custom Importer for. It's a script you can attach to the importer process to do extra work on your TMX prefab just before the import completes.
This repository here uses one such custom importer and it should serve a decent starting point for you: https://github.com/Seanba/SuperMovingPlatform
Is not working do not trust in this tool I was very reasonable to donate but I would not many errors to import do not resize as well in unity everyone try to use the tile palette in unity is hard pain of butt is the only way to get a fast workflow.
Like I've told you before there is a trivial solution to the problem you were having. Unity has the concept of "Pixels Per Unit" that is used for textures, sprites and tilemaps. SuperTiled2Unity also supports this functionality. All you need to do is make sure you are using the same "Pixels Per Unit" value for your Tiled maps and tilesets.
![](https://img.itch.zone/aW1nLzIyODk1NTMucG5n/original/Gz%2BF8O.png)
By default, Unity prefers values of 100 because that works well with their 2D physics systems. Personally, I use a value of 1 so that 1 unit is 1 pixel. YMMV.
If the issue persists then report a bug on my GitHub page and I will look at it further.
https://github.com/Seanba/SuperTiled2Unity/issues
Keep in mind this is a project I do in my spare time and make freely available for others. Your aggressive attitude is misplaced even if you did make a donation.
Hello Seanba,
I may not be using Tiled correctly with SuperTiled2Unity but I am getting this error on the Tiled map file:
"SuperTiled2Unity version: 1.4.6, Unity version: 2019.1.0f2
Errors detected in tileset 'Map_Tileset.tsx'. Check the tileset inspector for more details. Your map may be broken until these are fixed.
Could not find tile 63. Make sure the tilesets were successfully imported.
Could not find tile 6. Make sure the tilesets were successfully imported.
Could not find tile 3. Make sure the tilesets were successfully imported.
Could not find tile 4. Make sure the tilesets were successfully imported.
Could not find tile 5. Make sure the tilesets were successfully imported.
Could not find tile 60. Make sure the tilesets were successfully imported.
Could not find tile 61. Make sure the tilesets were successfully imported.
Could not find tile 62. Make sure the tilesets were successfully imported.
Could not find tile 117. Make sure the tilesets were successfully imported."
I'm also getting this error on the Map_Tileset.tsx file even though the roguelikeSheet_transparent.png is in that spot:
"SuperTiled2Unity version: 1.4.6, Unity version: 2019.1.0f2
Missing texture asset: ../../../../RPGGame/Spritesheet/roguelikeSheet_transparent.png"
Is there an up to date walkthrough or maybe you know what I'm doing wrong?
Any help is appreciated. Thank you.
Nevermind I just want to reply to my comment in case anyone else has the same issue. Here is the link I found that fixed my issue. https://github.com/Seanba/SuperTiled2Unity/issues/44
Hi Seanba
I have a small question about the pivot point of the sprites when they are imported in Unity. We have a rock sprite and when it is imported in Unity, it looks like the pivot point is placed at the very bottom left. The problem is that we absolutely need to be able to change the position of that pivot point. We thought at first that changing the drawing offset in Tiled would also change the pivot, but it doesn't seem to work. Is there anyway to edit the pivot either in Tiled or in Unity (after importing everything)?
Hi there. SuperTiled2Unity puts the pivot point for Tile Objects at the bottom-left corner because that's what Tiled does.
If you need to manage the pivot point of a Tile Object then chances you want to control or manage other aspects of the object. In other words, it's now longer just a decorative tile on your level somewhere but tied into gameplay somehow.
In that case I'd recommend keeping your Tile Object in Tiled but use a "Prefab Replacement" so that those objects are replaced by a "proper" sprite (or some other object) that you have scripting control over.
You can read about Prefab Replacements in SuperTiled2Unity here:
https://github.com/Seanba/SuperPrefabReplacement
Thank you! :)
Hi Seanba
I've been using T2U for a while with no probs, but need to recreate all my objects on 50 levels so want to use Templates.
You mention using ST2U on the Tiled forum so I've installed it and imported my tsx file and tmx file.
I can't see where the level prefab file is that I need - can you point me in the right direction please.
Many thanks
Frank
Hi there. The TMX asset itself is the prefab. Just drag it into your scene. :)
Hi Seanba!
First, thank you very much for this awesome tool and for the previous Tiled2Unity tool.
I have a game which runs perfectly fine with the previous Tiled2Unity code, but migrating to SuperTiled2Unity has made the instantiation of the map very slow (can take 6 seconds to instantiate the map).
I am intantiate the map from a tmx file using (the tmx is being loaded from an asset bundle):
MapGameObject = GameObject.Instantiate(tmxObject);
Can you suggest anything I should try to get back the fast performance I had with the previous library and still migrate to the new library?
Thanks!
Hi there, @adiohaion. I'd like to do some profiling on your project to try to understand what is going on there. Would you mind sending it my way? My email is sean@seanba.com. Thanks.
Hi again, sorry for the late response! I was able to fix it by upgrading to the latest unity version & latest SuperTile2Unity. I also instantiate the map now from a prefab (like we use to do in the previous Tile2Unity) instead of the tmx. Thanks again for the great library!
HI, Seanba
I need help!!
When I load a .TMX map file it is counted as a game object that I can put into the scene but has no picture. I even imported the tileset .TSX as well as the original sprite sheet but it stays blank! please I need help.
Put all files in the same folder:
![](https://img.itch.zone/aW1nLzE5MzcyMDYucG5n/original/q8sWai.png)
Check the tileset path inside the tmx:
![](https://img.itch.zone/aW1nLzE5MzcyMDcucG5n/original/XcnhcQ.png)
Check the image path inside de tsx:
![](https://img.itch.zone/aW1nLzE5MzcyMDgucG5n/original/eA1ryf.png)
If you want to use relative paths, do as follows:
![](https://img.itch.zone/aW1nLzE5MzcyMTkucG5n/original/FJibUh.png)
Hope it helps!
Hi there, PuppyQake. Check the Inspector for your TMX file. Are there any errors there? My guess is that your referenced tileset.tsx file is not in the proper location. (You have to keep relative paths between your TMX , TSX, and texture files)
I’m having the same problem.
Getting error message “Missing texture asset: ../Spritesheet...png”
I imported the tsx, tmx, then png like you said.
When inspecting .tsx and error message pops up ^^^
When inspecting .tmx, “Missing tileset asset: ../...tsx”
Hi there, Dasimar, are your imported tilesets and PNGs in the locations they are expected? It looks like you may have imported them all to the same directory in Unity but they are expected to be in different directories.
Try opening your exported TMX file in Tiled. Is Tiled also complaining that it cannot find your PNG and TSX files?
(BTW, you can use Tiled to find those TSX and PNG files in their new relative locations.)
i'm unfortunately having the same issue. i love tiled but can't for the life of me get it to integrate into unity. i've tried saving all my files in a multitude of different directories yet i just can't seem to figure it out. step by step tutorials online are non existent or don't show how/where they save their tiled projects/tmx/png files. if there is any way to see a step by step process from absolute beginning to end (starting a tiled project, where to import from, where to save files and finally where to export for integration with unity) would be incredibly appreciated. i've gone around so many times that at this point i've only confused myself.
I'm sorry that some people are having difficulty with this. I assumed relative paths between TMX, TSX, and textures would be a straightforward concept for people making games although I concede that Unity assets don't normally have these restrictions.
The easiest thing to do, before you do anything with Unity, is have your Tiled map and all other files it references (tilesets and textures) all live in the same folder on your harddive somewhere. Then, drag that folder into your Unity project in one go.