fix: sorting by layer does not work properly

3.x
micromang 2022-04-15 23:17:04 +09:00 committed by mob-sakai
parent 5a8f1263ef
commit ccc09e6aca
1 changed files with 1 additions and 1 deletions

View File

@ -230,7 +230,7 @@ namespace Coffee.UIParticleExtensions
// Sorting layer: ascending
if (aRenderer.sortingLayerID != bRenderer.sortingLayerID)
return aRenderer.sortingLayerID - bRenderer.sortingLayerID;
return SortingLayer.GetLayerValueFromID(aRenderer.sortingLayerID) - SortingLayer.GetLayerValueFromID(bRenderer.sortingLayerID);
// Sorting order: ascending
if (aRenderer.sortingOrder != bRenderer.sortingOrder)