Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors after importing. #44

Closed
DonTomasDeLaVega opened this issue Feb 26, 2019 · 11 comments
Closed

Errors after importing. #44

DonTomasDeLaVega opened this issue Feb 26, 2019 · 11 comments

Comments

@DonTomasDeLaVega
Copy link

Hi! So here are my problems: i've done my maps on tiled, nothing too complicated, and i decide to import it into unity using ST2U, that i already used someday. So i click on Assets>Import New Assets; select the map, the tileset and the tileset's image, import them, but then, error messages on the screenshots. What should i do?
erreur1 (error on the map's inspector)
erreur2 (error on the tileset's inspector)
Thank you, Don Thomas.

@Seanba
Copy link
Owner

Seanba commented Feb 26, 2019

Hi there, @DonTomasDeLaVega. It looks like your TSX file is expecting your texture location to be in a different folder, specifically at ../../test-ooh ca l'air bien fait/Assets/Textures/Murs etc.png

Is test-ooh ca l'air bien fait a separate project? Or should Murs etc.png be moved into your Textures directory?

Once you get the relative paths of your TSX and texture files set up correctly it should work for you.

@DonTomasDeLaVega
Copy link
Author

Yeah, it is another project actually... How can i change those paths to the real ones?

@Seanba
Copy link
Owner

Seanba commented Feb 26, 2019

It's probably easiest at this point to edit your Murs etcwola.tsx file by hand.

Look at it in a text editor and where you see something like this ...

<image source="../../test-ooh ca l'air bien fait/Assets/Textures/Murs etc.png" ..../>

... replace it with your new relative path ...

<image source="Murs etc.png" ..../>

@DonTomasDeLaVega
Copy link
Author

Woah, magic as i love it! It works just fine now, thank you!

@Seanba
Copy link
Owner

Seanba commented Feb 26, 2019

I'm glad you got it working. Good luck with your game. :)

@Seanba Seanba closed this as completed Feb 26, 2019
@TurtleFlyte
Copy link

So I have this same problem. But when I edit the text file this happens in tiled-
Screen Shot 2019-04-20 at 4 12 45 PM
Then after I locate the file and save it... the same error happens after I import it to unity.
Screen Shot 2019-04-20 at 4 19 37 PM
Screen Shot 2019-04-20 at 4 19 49 PM

@Seanba
Copy link
Owner

Seanba commented Apr 21, 2019

Hi there, @TurtleFlyte. Where does rougelikeSheet_transparent.png exist in your Unity project? It looks to me like that Unity/roguelike-pack/Spritesheet is a folder on your harddrive, not a folder in your Unity project.

Just to clear, all files referenced by your Tiled files (TMX, TSX, PNG) must be part of your Unity project and their relative paths to each other must be intact.

@TurtleFlyte
Copy link

There is one in my Unity project and one on my hard drive.

@Seanba
Copy link
Owner

Seanba commented Apr 21, 2019

There is one in my Unity project and one on my hard drive.

Okay, but it looks like your tileset file is referencing the PNG that is not part of your Unity project.

Try this:

  1. Find rougelikeSheet_transparent.tsx in your Unity project
  2. Open that TSX file in Tiled
  3. Go to Tileset -> Properties
  4. Press Edit... on the Image field
  5. Press Browse... in the Edit Tileset dialog
  6. Select the PNG file that is in your Unity project
  7. Resave the TSX file

image

image

image

That should fix up your TSX file so that it is using the PNG in the right location.

@TurtleFlyte
Copy link

I tried that and it didn't work I get this-
Screen Shot 2019-04-21 at 1 14 24 PM
Screen Shot 2019-04-21 at 1 14 39 PM
As you can see I made the changes and the sprite sheet is right there but its still not working.

@Seanba
Copy link
Owner

Seanba commented Apr 21, 2019

It looks to me that your relative path should simply be roguelikeSheet_transparent.png since it is in the same directory as your TMX and TSX files. However, for some reason, the relative path your tileset is referencing is Unity/Projects/ActionRPG/Assets/Art/roguelikeSheet_transparent.png. I'm guessing that ActionRPG is the root of your project, right? So, this doesn't look right.

Perhaps it would be easier for you to export your Unity project as a Unity Project and send it to me? My email is sean@seanba.com.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants