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

Isometric tilemap has inverted sorting order when imported into unity #239

Open
BossGrand opened this issue Apr 18, 2023 · 9 comments
Open

Comments

@BossGrand
Copy link

BossGrand commented Apr 18, 2023

Hi I have a isometric tile map that looks like this in Tiled
image

When I import it into unity I get the following result.

image

If I manually invert all the sorting orders of the tiles generated by SuperTiled I get the expected layout.
I have a script that negates each sorting order of the tiles, effectively reversing the sorting order
image

I couldn't find any setting or docs on how to fix this. Am I doing something wrong or is this a bug?

@seanb-22ct
Copy link
Collaborator

Hi there, @BossGrand. That looks like a bug. Can you share your project with me so I can take a closer look?

@seanb-22ct
Copy link
Collaborator

Hi again. It just occurred to me that you may need a custom Transparency Sort Axis in your graphics settings.

Here's some Unity documentation on it: https://docs.unity3d.com/Manual/Tilemap-Isometric-CreateIso.html

@BossGrand
Copy link
Author

I tried different transparency sort axises but none worked. Here is a demo repo of my project
https://github.com/BossGrand/Iso-Demo

@seanb-22ct
Copy link
Collaborator

Hi again, @BossGrand. I had forgotten that Isometric maps, by necessity, are rendered as objects and not as tiles in a tilemap.
This is because Unity does not support the concept of an Isometric map.
(Staggered Isometric maps are supported though.)

In order to have the isometric objects rendered in the proper order you'll need reimport your Tiled maps with either the Overhead Static (probably best) or Overhead Dynamic layer/object sorting.

image

This should have been handled for you automatically but it is a bug I need to fix. In the meantime I hope that setting helps you out.

FWIW, depending on your game you may want to just go with the staggered isometric map option in Tiled.

@BossGrand
Copy link
Author

BossGrand commented Apr 19, 2023

Were you able to get it to work properly? I tried both overhead static/dynamic and neither seemed to have an effect. I pressed apply, deleted the grid from the game and then re placed it from the assets

As for the isometric, I want to make a Tactics game like Tactics Ogre :) so the current layout is what I need

@BossGrand
Copy link
Author

image

@seanb-22ct
Copy link
Collaborator

Hi again, @BossGrand. Yes, I got it working. Keep in mind that you still have to use a custom sort axis.

image

@BossGrand
Copy link
Author

BossGrand commented Apr 19, 2023

Oh awesome I didn't have them both set, thank you so much!

@seanb-22ct
Copy link
Collaborator

I'm glad you got it working. I'm going to keep this issue open for now because there are a couple of small items I want to clean up on my end. I don't want the user to be confused like this when things are looking right. :)

@seanb-22ct seanb-22ct reopened this Apr 19, 2023
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

2 participants