diff --git a/Scripts/Utils.cs b/Scripts/Utils.cs index b7c5753..79bee49 100644 --- a/Scripts/Utils.cs +++ b/Scripts/Utils.cs @@ -224,17 +224,10 @@ namespace Coffee.UIParticleExtensions return (int) Mathf.Sign(bPos - aPos); return (int) Mathf.Sign(GetIndex(self, a) - GetIndex(self, b)); - - // Material instance ID: match - // if (aMat.GetInstanceID() == bMat.GetInstanceID()) - // return 0; - - // Transform: ascending - // return TransformCompare(aTransform, bTransform); }); } - private static int GetIndex(IReadOnlyList list, Object ps) + private static int GetIndex(IList list, Object ps) { for (var i = 0; i < list.Count; i++) { @@ -244,20 +237,6 @@ namespace Coffee.UIParticleExtensions return 0; } - // private static int TransformCompare(Transform a, Transform b) - // { - // while (true) - // { - // if (!a && !b) return 0; - // if (!a) return -1; - // if (!b) return 1; - // if (a.parent == b.parent) return a.GetSiblingIndex() - b.GetSiblingIndex(); - // - // a = a.parent; - // b = b.parent; - // } - // } - public static long GetMaterialHash(this ParticleSystem self, bool trail) { if (!self) return 0; @@ -296,4 +275,4 @@ namespace Coffee.UIParticleExtensions self.ForEach(action); } } -} \ No newline at end of file +}