A downloadable tool

Download NowName your own price

SuperTiled2Unity

(Last updated Sep 14th, 2023. Online documentation available on GitHub Wiki.)

Note: Please report any bugs to my Github page.

SuperTiled2Unity is a collection of C# Unity scripts that can automatically import Tile Map Editor files directly into your Unity projects.

The goal of SuperTiled2Unity is simple: Tiled files saved to your Unity project are automatically converted to prefabs you can drop into your scenes. That's it.

SuperTiled2Unity it a complete rewrite of my popular Tiled2Unity tool, first released in 2014. Unity has seen many improvements in that time and SuperTiled2Unity takes advantage of Scripted Importers to support Tiled files directly within Unity. There is no longer any need for a separate exporter tool which means SuperTiled2Unity is supported on every OS right out-of-the-box.

SuperTiled2Unity uses tile-based classes now native to Unity (like Tilemap) so that built prefabs are closer to Unity's vision of such assets.

This tool is currently available for free but donations (or even a kind word) are always appreciated.

StatusReleased
CategoryTool
Rating
Rated 4.9 out of 5 stars
(45 total ratings)
AuthorSeanba
Tags16-bit, 2D, 8-Bit, tiled, Tilemap, tool, Unity

Download

Download NowName your own price

Click download now to get access to the following files:

Super Tiled2Unity 2.1.1 Package 508 kB
Super Tiled2Unity 2.0.1 Package 503 kB
SuperTiled2Unity.1.10.7.unitypackage (latest for Unity 2020.2) 427 kB
SuperTiled2Unity.1.1.7.unitypackage (latest for Unity 2018.2) 844 kB

Development log

View all posts

Comments

Log in with itch.io to leave a comment.

Viewing most recent comments 2 to 41 of 95 · Next page · Last page

Hi there. Tiled2Unity is a great tool! It saves us massive amounts of time converting our game from Amiga to Unity!😊

We are using the latest versjon of ST2U (2.1.1), and I was wondering how to change the Sprite Sort Point of objects in an object layer. I looks like the objects all get Center as the Sprite Sort Point when exported, but since we are making an isometric game, it would be nice to be able to change the Sprite Sort Point to Pivot. Is that possible in any settings, or would I need to make a custom importer? :)

(+1)

I'm using version 2.1.1, I find that every object in object layer is imported as a collider by default, which is fine for me.

But I see a post on 2021, which says "it(SuperTiled2Unity) will not automatically generate collision based on Objects".

I think what really happen in my Unity project is the actural fact - "In version 2.1.1, every object in object layer is imported as a collider by default". So the post must be outdated.

But I don't see anything about this on document.

So, I'm here just want to make sure that "In version 2.1.1, every object in object layer is imported as a collider by default".

I'm having problem with super-tiled2unity.v2.1.1! Always I close Unity and when reopen, I have problem with import txs files e doesn,t work anymore. It doesn't locate files and give the follow message:

Unknown error of type importing 'Assets/TiledLevels/TiledImported/tileset/automap-tiles.tsx': Failed to add object of type `SuperTileset`. Check that the definition is in a file of the same name and that it compiles properly.

Stack Trace:

  at (wrapper managed-to-native) UnityEditor.AssetImporters.AssetImportContext.AddObjectToAsset_Injected(UnityEditor.AssetImporters.AssetImportContext,string,intptr,intptr)

  at UnityEditor.AssetImporters.AssetImportContext.AddObjectToAsset (System.String identifier, UnityEngine.Object obj, UnityEngine.Texture2D thumbnail) [0x0000e] in <67d1ed7258bf49b19e780d91cc47c581>:0 

  at SuperTiled2Unity.Editor.SuperImportContext.AddObjectToAsset (System.String identifier, UnityEngine.Object obj, UnityEngine.Texture2D thumbnail) [0x00001] in D:\GitHubPrAnderson\MyCustomPackagesUnity\super-tiled2unity.v2.1.1\Editor\Importers\SuperImportContext.cs:43 

  at SuperTiled2Unity.Editor.TsxAssetImporter.CreateTileset (System.Xml.Linq.XElement xTileset) [0x00041] in D:\GitHubPrAnderson\MyCustomPackagesUnity\super-tiled2unity.v2.1.1\Editor\Importers\TsxAssetImporter.cs:58 

  at SuperTiled2Unity.Editor.TsxAssetImporter.ProcessTileset (System.Xml.Linq.XElement xTileset) [0x00001] in D:\GitHubPrAnderson\MyCustomPackagesUnity\super-tiled2unity.v2.1.1\Editor\Importers\TsxAssetImporter.cs:45 

  at SuperTiled2Unity.Editor.TsxAssetImporter.ImportTsxFile () [0x0001e] in D:\GitHubPrAnderson\MyCustomPackagesUnity\super-tiled2unity.v2.1.1\Editor\Importers\TsxAssetImporter.cs:40 

  at SuperTiled2Unity.Editor.TsxAssetImporter.InternalOnImportAsset () [0x00018] in D:\GitHubPrAnderson\MyCustomPackagesUnity\super-tiled2unity.v2.1.1\Editor\Importers\TsxAssetImporter.cs:33 

  at SuperTiled2Unity.Editor.SuperImporter.OnImportAsset (UnityEditor.AssetImporters.AssetImportContext ctx) [0x00065] in D:\GitHubPrAnderson\MyCustomPackagesUnity\super-tiled2unity.v2.1.1\Editor\Importers\SuperImporter.cs:71 

UnityEngine.Debug:LogErrorFormat (string,object[])

SuperTiled2Unity.Editor.SuperImporter:OnImportAsset (UnityEditor.AssetImporters.AssetImportContext) (at D:/GitHubPrAnderson/MyCustomPackagesUnity/super-tiled2unity.v2.1.1/Editor/Importers/SuperImporter.cs:92)

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

And I install as a package, managed by Unity package manager. I really don't know what I can do now. I want to use Tiled + SuperTiled very much but, with this problem I can't!

hi there! i was wondering if this package provides a way to export tilemaps in a given unity scene to a file that can be opened in Tiled? basically Unity2Tiled haha

I have been doing all my mapping in unity, but some team members want to help with the mapping in Tiled. I need to export the work i currently have for them to use.

(2 edits) (+1)

Import the sample Overhead from super-tiled2unity.v2.1.0 will catch the exceptions.

SuperTiled2Unity version: unknown, Unity version: 2022.3.9f1

Unknown error encountered. Please report as bug. Stack track is in the console output.

Object reference not set to an instance of an object

Unknown error of type importing 'Assets/ThirdParty/super-tiled2unity/Samples/Overhead/Maps/Zoria Tileset/scraps.tsx': Failed to add object of type `SuperTile`. Check that the definition is in a file of the same name and that it compiles properly.

Stack Trace:

  at (wrapper managed-to-native) UnityEditor.AssetImporters.AssetImportContext.AddObjectToAsset(UnityEditor.AssetImporters.AssetImportContext,string,UnityEngine.Object,UnityEngine.Texture2D)

  at UnityEditor.AssetImporters.AssetImportContext.AddObjectToAsset (System.String identifier, UnityEngine.Object obj) [0x00001] in <2e279d988b9d4542841de511fbfdf8c2>:0 

  at SuperTiled2Unity.Editor.SuperImportContext.AddObjectToAsset (System.String identifier, UnityEngine.Object obj) [0x00001] in D:\Work\UnityWork\hl-client-unity\HerosLand\Assets\ThirdParty\super-tiled2unity\Editor\Importers\SuperImportContext.cs:38 

  at SuperTiled2Unity.Editor.AtlasBuilder.Commit (System.Single ppu) [0x001bd] in D:\Work\UnityWork\hl-client-unity\HerosLand\Assets\ThirdParty\super-tiled2unity\Editor\AtlasBuilder.cs:246 

  at SuperTiled2Unity.Editor.AtlasBuilder.Build (System.Single ppu) [0x00029] in D:\Work\UnityWork\hl-client-unity\HerosLand\Assets\ThirdParty\super-tiled2unity\Editor\AtlasBuilder.cs:88 

  at SuperTiled2Unity.Editor.TilesetLoader.BuildTileset (System.Xml.Linq.XElement xTileset) [0x00054] in D:\Work\UnityWork\hl-client-unity\HerosLand\Assets\ThirdParty\super-tiled2unity\Editor\Loaders\TilesetLoader.cs:101 

  at SuperTiled2Unity.Editor.TilesetLoader.LoadFromXml (System.Xml.Linq.XElement xTileset) [0x0005c] in D:\Work\UnityWork\hl-client-unity\HerosLand\Assets\ThirdParty\super-tiled2unity\Editor\Loaders\TilesetLoader.cs:41 

  at SuperTiled2Unity.Editor.TsxAssetImporter.CreateTileset (System.Xml.Linq.XElement xTileset) [0x0008a] in D:\Work\UnityWork\hl-client-unity\HerosLand\Assets\ThirdParty\super-tiled2unity\Editor\Importers\TsxAssetImporter.cs:62 

  at SuperTiled2Unity.Editor.TsxAssetImporter.ProcessTileset (System.Xml.Linq.XElement xTileset) [0x00001] in D:\Work\UnityWork\hl-client-unity\HerosLand\Assets\ThirdParty\super-tiled2unity\Editor\Importers\TsxAssetImporter.cs:45 

  at SuperTiled2Unity.Editor.TsxAssetImporter.ImportTsxFile () [0x0001e] in D:\Work\UnityWork\hl-client-unity\HerosLand\Assets\ThirdParty\super-tiled2unity\Editor\Importers\TsxAssetImporter.cs:40 

  at SuperTiled2Unity.Editor.TsxAssetImporter.InternalOnImportAsset () [0x00018] in D:\Work\UnityWork\hl-client-unity\HerosLand\Assets\ThirdParty\super-tiled2unity\Editor\Importers\TsxAssetImporter.cs:33 

  at SuperTiled2Unity.Editor.SuperImporter.OnImportAsset (UnityEditor.AssetImporters.AssetImportContext ctx) [0x00065] in D:\Work\UnityWork\hl-client-unity\HerosLand\Assets\ThirdParty\super-tiled2unity\Editor\Importers\SuperImporter.cs:71 

UnityEngine.Debug:LogErrorFormat (string,object[])

ah, im having the same issue. did you  manage to figure this out?

Hi there. It looks like you copied Super Tiled2Unity into your project Assets directory.  ST2U is now a package that works with Unity Package Manager. As such you need to copy it into your project's Packages folder. Hope that helps.

(3 edits)

Collider2DExtensions.cs Exception

'Collider2D' does not contain a definition for 'compositeCapable' and no accessible extension method 'compositeCapable' accepting a first argument of type 'Collider2D' could be found (are you missing a using directive or an assembly reference?)

 'Collider2D' does not contain a definition for 'compositeOperation' and no accessible extension method 'compositeOperation' accepting a first argument of type 'Collider2D' could be found (are you missing a using directive or an assembly reference?)

For Unity2022.3.9, Collider2d cannot find compoisteCapable and compositeOperation properties.

if (merge && !collider2d.compositeCapable)
{
    Debug.LogWarning($"Super Tiled2Unity warning: Collider2D '{collider2d.name}' is not composite capable");
}
collider2d.compositeOperation = merge ? Collider2D.CompositeOperation.Merge : Collider2D.CompositeOperation.None;

So, upgrading to 2.0.1 .zip from 1.10.7 's .unitypackage. is this compatible with unity 2018 or should i upgrade?

Hi there. Sorry for the late reply. Version 2.0 and up requires Unity 2020.3. And instead of adding it to your Assets folder it is now a zip that you unzip into your Packages folder.
It will then be installed as an Embedded Package through the Unity Package Manager.

alrighty cool, thanks! 

Can you please fix the "AssetImporterEditor.ResetValues() is obsolete" warning for Unity Version 2022 and higher?

Have upgrade it myself.I have no experience with github otherwise i can offer my changes there.

(+2)

These warnings should all be fixed now that ST2U is available as a proper UMP package. Thank-you for your patience. This has been a long time coming.

Great stuff.Have add it via OpenUPM.

OpenUPM? Can you tell me a bit about that?

(1 edit)

if the screenshot is to tiny...open the image in a new tab.

(1 edit) (+1)

It's another installation method for a unity package. Instead of dropping a folder into the packages folder locally, it can be downloaded straight from the unity package manager, even checking for and downloading updates with an easy update button. You can request the OpenUPM devs to have your repo be recognized and be added to the OpenUPM ecosystem. Google about it to find out more, but it's very cool!

Five year later, this project is still here, and keeps updating, amazing.
Great job, and a huge thanks!

  • 我今天要用这个软件。谢谢

Sorry for that question, but would you provide a Godot 4 version too?

https://github.com/Kiamo2/YATI

Could i use this with a 3d plane?

I really appreciate the amount of work that goes into this project.

Amazing program. As a young dev student, I appreciate this enormously.

I'm getting errors about needing to persevere relative path. Might want to add something to the docs.

Thank you much for your work.


M. D.

Hi, one question, how can I get a custom property of tiles?

finally, read some of your asset codes and I got a way to deal with this. cool!

(1 edit)

Thank you for building and maintaining this project - it's magical <3

Deleted 1 year ago
(+1)

Sorry for the late reply here but chances are your textures were imported with bilinear filtering. Go to the the import settings of your texture in the inspector window and re-import your textures using point filtering.

I'm struggling to get this to work properly. I do all the steps mentioned in this video and when I drag the .tmx file onto the scene only the collisions boxes show up 


How can I fix this to make sure it all shows up? 

(+4)

Absolutely awesome! Thanks for your hard work and dedication to this project!

(+1)

I've used right now and have succeeded to use it with Tiled and Unity; i am now really happy with this and cannot thank you enough for the help!

Thank you so much for  Prefab Replacements! I tried using a Tile in an Object Layer with collision and it created too many nested GameObjects for my liking. Now I can just set markers and have Unity place the Prefabs in the right spot! Thank you thank you thank you!

(+1)

can i use this with LDtk ?

unfortunately no. LDtk uses a different method to integrate with engines like Unity. In theory you could probably write a scripted importer to process the LDtk file but as of last year this was not something anyone had done. I haven't checked in a while but i don't think it was on their roadmap to integrate with Unity this tightly.

Thx or taking the time to replay even if it was an old comment 😅

You are right ! Thankfully I was lucky, there is a developer called cammin, he made an integration for that, it is called "Ldtk to unity" and it worked well with my project

(+1)

oh nice! i think i chatted with him about how SuperTiled2Unity works on the LDtk discord so awesome to see it happened. I've added it to my list to check out at some point. thanks!

is there a larger tileset import? my tileset is almost 1200px by 4048

Thanks for this awesome plugin Seanba. :)

Hey i have a problem because i am trying to import some tiles of "Tiled" but when i put all i need that say "We can't find the X sprite and all sprites i use...and i need something like a guide of this because i don't know how use it and i think some people have this problem too please help me (anyone) :c

Is this can be used to import maps at runtime?

(1 edit)

I am using the latest versions of SuperTiled2Unity, Tiled, and Unity, and I am having a problem with importing an isometric map.


This is the map I made using Tiled:

This is what it looks like in Unity (the name of my project has been blacked out):

I even tried doing a custom axis as linked to in a previous comment made over a year ago by someone else.


Can you please help me?

(+1)

I’m here to just say: I looove this Plugin it has quite deep integration in Unity and brings a new level of working with tiled and unity. I’m also happy, that the source is available. I had scaling issues, because I wanted to have a specific kind of parallaxing and was able to implement it in the Plugin.

Keep up the awesome work!

(+1)

Hi, i just downloaded this and I am new to unity, how do I use this? Is there some documentation or instruction tutorial. (preferably written).

I saw they have a doc https://supertiled2unity.readthedocs.io/

(+1)

That's nice but what do I do with the file I just downloaded? How do I add it to Unity?

I don't know😑

(+1)

with unity open you either doubleclick the unitypackage file or drag and drop it into the assets folder in Unity editor. it will open an install dialog

oh that was simple. Thanks.

Hi @Seanba - how can I get access to the Tilemap image to change it at runtime? I want to change the sky tileset gradually as you move through the level, but I can't find any way to access and change the tilemap graphics.

Hey there. I'd recommend copy/pasting your response here https://seanba.itch.io/supertiled2unity/devlog/231859/supertiled2unity-version-1... or on whichever version you're currently using. I think you'll get a faster response! Cheers and good luck

Ah cool - thank you. Will do :)

no problem! Good luck

Hey @Seanba I recently upgraded to Unity 2020.3.0f1. I'm using the Universal Render Pipeline and created a WebGL project with SuperTiled2Unity. The Tiled Map renders fine on Desktop Chrome but is just blacked out on Android. Would love some feedback! Thanks again for all your work

Thank you so much for your hard work, it is really appreciated! :)

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.

Is there anyway to add support for normal maps to this? I'd like to use normal maps from Sprite DLight on my tilemaps

(+1)

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

Viewing most recent comments 2 to 41 of 95 · Next page · Last page