Skip to content

Changes intended to improve how RenderSorter handles nested group layers#312

Open
spiralhug wants to merge 1 commit into
Seanba:masterfrom
spiralhug:feature/nested-group-layer-improvements
Open

Changes intended to improve how RenderSorter handles nested group layers#312
spiralhug wants to merge 1 commit into
Seanba:masterfrom
spiralhug:feature/nested-group-layer-improvements

Conversation

@spiralhug

Copy link
Copy Markdown

-Do not reset CurrentTileZ when beginning a nested group layer
-Do not iterate m_CurrentSortOrder if in a nested group layer
-Only reset CurrentTileZ on BeginGroupLayer instead of in both Begin and End

From the Tiled Discord's SuperTiled2Unity channel:

"ok I realized that nested Group layers don't import correctly as noted above

These changes to RenderSorter appear to help nested group layers without any manual unity:SortingOrder or unity:SortingLayer do what I would expect. Basically the draw like they should and look like they do in Tiled.

My expectation is that "Group layers" in Unity turn into a single tilemap and within that tilemap each tile layer in Tiled ends up being on its own Z value so it gets sorted in unity. Without the change the Group resets the z depth every time a group starts or ends which fucks things up. This tries to maintain the z depth in nested groups"

-Do not reset CurrentTileZ when beginning a nested group layer
-Do not iterate m_CurrentSortOrder if in a nested group layer
-Only reset CurrentTileZ on BeginGroupLayer instead of in both Begin and End
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

Successfully merging this pull request may close these issues.

1 participant