Changes intended to improve how RenderSorter handles nested group layers#312
Open
spiralhug wants to merge 1 commit into
Open
Changes intended to improve how RenderSorter handles nested group layers#312spiralhug wants to merge 1 commit into
spiralhug wants to merge 1 commit into
Conversation
-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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
-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"