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
6 changes: 5 additions & 1 deletion Assets/Scripts/IsoSpriteSorting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ public void SetupStaticCache()

private void RefreshBounds()
{
cachedBounds = new Bounds2D(renderersToSort[0].bounds);
Bounds groupBounds = renderersToSort[0].bounds;
foreach (Renderer childRenderer in renderersToSort) {
groupBounds.Encapsulate(childRenderer.bounds);
}
cachedBounds = new Bounds2D(groupBounds);
}

private void RefreshPoint1()
Expand Down