Problem when I import a map of tiled

Hi boys and girls…
I have a problem when I import a map in unity with Tiled2Unity. The map looks white!!!

This is the problems I have:

Error creating material 'Overworld.mat'. Texture was not found: Assets/SPRITES/Overworld.png
Tiled2Unity.ImportBehaviour:RecordError(String, Object[]) (at Assets/Tiled2Unity/Scripts/Runtime/ImportBehaviour.cs:172)
Tiled2Unity.ImportTiled2Unity:AssignTextureAssetToMaterial(Material, String, String, ImportBehaviour) (at Assets/Tiled2Unity/Scripts/Editor/ImportTiled2Unity.Material.cs:161)
Tiled2Unity.ImportTiled2Unity:ImportAllMaterials(ImportBehaviour) (at Assets/Tiled2Unity/Scripts/Editor/ImportTiled2Unity.Material.cs:142)
Tiled2Unity.ImportTiled2Unity:ImportAllTextures(ImportBehaviour) (at Assets/Tiled2Unity/Scripts/Editor/ImportTiled2Unity.Texture.cs:61)
Tiled2Unity.ImportTiled2Unity:ImportBegin(String, ImportTiled2Unity) (at Assets/Tiled2Unity/Scripts/Editor/ImportTiled2Unity.Xml.cs:40)
Tiled2Unity.TiledAssetPostProcessor:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Assets/Tiled2Unity/Scripts/Editor/TiledAssetPostProcessor.cs:83)
UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets(String[], String[], String[], String[], String[])


Imported prefab 'Assets/Tiled2Unity/Prefabs/PRUEBA.prefab' from 'Assets/Tiled2Unity/Imported/PRUEBA.tiled2unity.xml' with 0 warnings and 1 errors.
Error creating material 'Overworld.mat'. Texture was not found: Assets/SPRITES/Overworld.png

Tiled2Unity.ImportBehaviour:ReportPrefabImport(String) (at Assets/Tiled2Unity/Scripts/Runtime/ImportBehaviour.cs:198)
Tiled2Unity.ImportTiled2Unity:PrefabImported(String) (at Assets/Tiled2Unity/Scripts/Editor/ImportTiled2Unity.Prefab.cs:37)
Tiled2Unity.TiledAssetPostProcessor:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Assets/Tiled2Unity/Scripts/Editor/TiledAssetPostProcessor.cs:103)
UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets(String[], String[], String[], String[], String[])

Please I need help…

Welcome to the Tiled forum, @Pou!

As can be read in the error message, it’s expecting a texture at “Assets/SPRITES/Overworld.png”, however judging by your screenshot this file is in your project at “Assets/Tiled2Unity/Sprites/Overworld.png”. This mismatch is likely the cause of the texture failing to load and the map looking white.

Note that Tiled2Unity has been deprecated for years now so you’ll probably want to switch to SuperTiled2Unity at some point. I noticed you’re also using a very old version of Unity though, which would need to be updated at the same time.

Thank you very much for answering, I have tried with SuperTiled2Unity as you told me and I have downloaded the latest version of unity. But I have some questions:

  • When I save the map that I made in tiled, I only see the tmx file, I need to know how to get the tsx and png file. I have informed myself a little to know more or less how it is done and from what I have seen in the videos they say that you have to put the tmx, tsx and png files but at no time does it explain how they are achieved.
    Sorry if my English is not very good, I am Spanish.

The png file, tsx file and tmx file all need to be in your Unity assets folder. The easiest way to set things up is create those files there in the first place, which avoids any potential problems with relative paths when moving the files into the assets folder.

So your workflow should basically be as follows:

  • Copy any png files you’d like to use to your Unity Assets folder.
  • In Tiled, create a new tileset based on the png file from your Assets folder, and save it as a tsx file in the Assets folder.
  • In Tiled, create a new map and save it as a tmx file in the Assets folder.
  • You should see SuperTiled2Unity automatically generate the relevant Unity assets, which you can drag into your scene. When you place some tiles on the map and save it again, its related asset should get updated automatically.

Of course you can save the png, tsx and tmx files also in any child folders, as long as they’re within your Assets folder.

Thank you very much friend, I have been able to fix the error. What I have done has been to add the tmx and png files to the assets folder. Although I don’t understand why it works for me without adding the tsx file.

You might have your tileset definition embedded inside of the map, rather than stored separately. This is an option, though it is recommended to share the tileset definition among your maps.

If this is the case, you can replace the embedded tileset with the external tsx file using the small “Replace Tileset” button at the bottom of the Tilesets view.

Thank you very much for everything, I already solved my mistake. I have just one more question, how could I put some cells to grid when making my maps in tiled?

Sorry, I don’t understand the question. What does it mean to “put some cells to grid”?

Nothing, I already solved it. But I have a question about unity. I already made the map with tiled and imported it to unity with tiled2unity but my question is not about tiled, is about unity. I need to know how to enlarge the camera so that it occupies the entire map.

this is the map that I created with tiled and i imported but as you can see the camera does not occupy the entire map and I don’t know how to fix it.

What happens is that if I enlarge the camera down so that it occupies the entire map, it stays that way.

I do not know what I can do.

Sorry, I can’t really help with the Unity side of things.