Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,21 @@ public void EndObjectLayer(SuperObjectLayer layer)

public void BeginGroupLayer(SuperGroupLayer layer)
{
CurrentTileZ = 0;
// Do this before m_GroupDepth is incremented to see if I'm in a nested group
// If I am not, reset CurrentTileZ
if (!IsInGroup())
CurrentTileZ = 0;
m_GroupDepth++;
SortingLayerCheck(layer.gameObject);
}

public void EndGroupLayer()
{
m_GroupDepth--;
// Do not iterate m_CurrentSortOrder if in a nested group so layers contine to inherit the sorting order from their parent
if (IsInGroup())
return;
m_CurrentSortOrder++;
CurrentTileZ = 0;
}

public string AssignTilemapSort(TilemapRenderer renderer)
Expand Down Expand Up @@ -119,4 +124,4 @@ private void SortingLayerCheck(GameObject go)
}
}
}
}
}