diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll
index 92f2fbd..5ea44dd 100644
Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll differ
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb
index 32cb47f..cb633e1 100644
Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb differ
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll
index 8c955ef..5c7cd74 100644
Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll differ
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb
index d761a49..8b6f54e 100644
Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb differ
diff --git a/UnityTests.Unity5/Assets/_Tests/EmptySequences.cs b/UnityTests.Unity5/Assets/_Tests/EmptySequences.cs
index 1524cc7..99c7cf0 100644
--- a/UnityTests.Unity5/Assets/_Tests/EmptySequences.cs
+++ b/UnityTests.Unity5/Assets/_Tests/EmptySequences.cs
@@ -25,8 +25,10 @@ public class EmptySequences : BrainBase
if (createSequenceA) {
a = DOTween.Sequence()
.AppendCallback(() => Debug.Log("A callback 1/2"))
-// .AppendInterval(1f)
+ .AppendInterval(1f)
.AppendCallback(() => Debug.Log("A callback 2/2 (1 sec delay)"))
+ .InsertCallback(0, () => Debug.Log("A callback 0 A"))
+ .InsertCallback(0, () => Debug.Log("A callback 0 B"))
.OnStart(() => Debug.Log("A OnStart"))
.OnStepComplete(() => Debug.Log("A OnStepComplete"))
.OnComplete(() => Debug.Log("A OnComplete"))
diff --git a/UnityTests.Unity5/Assets/_Tests/EmptySequences.unity b/UnityTests.Unity5/Assets/_Tests/EmptySequences.unity
index 7ba5def..1cda1ff 100644
Binary files a/UnityTests.Unity5/Assets/_Tests/EmptySequences.unity and b/UnityTests.Unity5/Assets/_Tests/EmptySequences.unity differ
diff --git a/_DOTween.Assembly/DOTween/DOTween.cs b/_DOTween.Assembly/DOTween/DOTween.cs
index fb7193e..dce34fb 100644
--- a/_DOTween.Assembly/DOTween/DOTween.cs
+++ b/_DOTween.Assembly/DOTween/DOTween.cs
@@ -32,7 +32,7 @@ namespace DG.Tweening
public class DOTween
{
/// DOTween's version
- public static readonly string Version = "1.2.065"; // Last version before modules: 1.1.755
+ public static readonly string Version = "1.2.070"; // Last version before modules: 1.1.755
///////////////////////////////////////////////
// Options ////////////////////////////////////
diff --git a/_DOTween.Assembly/DOTween/Sequence.cs b/_DOTween.Assembly/DOTween/Sequence.cs
index 6759367..6c2b46a 100644
--- a/_DOTween.Assembly/DOTween/Sequence.cs
+++ b/_DOTween.Assembly/DOTween/Sequence.cs
@@ -166,7 +166,8 @@ namespace DG.Tweening
s.startupDone = true;
s.fullDuration = s.loops > -1 ? s.duration * s.loops : Mathf.Infinity;
// Order sequencedObjs by start position
- s._sequencedObjs.Sort(SortSequencedObjs);
+ StableSortSequencedObjs(s._sequencedObjs);
+// s._sequencedObjs.Sort(SortSequencedObjs); // Quicker old method that didn't implement stable sort
// Set relative nested tweens
if (s.isRelative) {
for (int len = s.sequencedTweens.Count, i = 0; i < len; ++i) {
@@ -347,11 +348,26 @@ namespace DG.Tweening
return false;
}
- static int SortSequencedObjs(ABSSequentiable a, ABSSequentiable b)
+ static void StableSortSequencedObjs(List list)
{
- if (a.sequencedPosition > b.sequencedPosition) return 1;
- if (a.sequencedPosition < b.sequencedPosition) return -1;
- return 0;
+ int len = list.Count;
+ for (int i = 1; i < len; i++) {
+ int j = i;
+ ABSSequentiable temp = list[i];
+ while (j > 0 && list[j - 1].sequencedPosition > temp.sequencedPosition) {
+ list[j] = list[j - 1];
+ j = j - 1;
+ }
+ list[j] = temp;
+ }
}
+
+// // Quicker but doesn't implement stable sort
+// static int SortSequencedObjs(ABSSequentiable a, ABSSequentiable b)
+// {
+// if (a.sequencedPosition > b.sequencedPosition) return 1;
+// if (a.sequencedPosition < b.sequencedPosition) return -1;
+// return 0;
+// }
}
}
\ No newline at end of file
diff --git a/_DOTween.Assembly/bin/DOTween.dll b/_DOTween.Assembly/bin/DOTween.dll
index 92f2fbd..5ea44dd 100644
Binary files a/_DOTween.Assembly/bin/DOTween.dll and b/_DOTween.Assembly/bin/DOTween.dll differ
diff --git a/_DOTween.Assembly/bin/DOTween.dll.mdb b/_DOTween.Assembly/bin/DOTween.dll.mdb
index 32cb47f..cb633e1 100644
Binary files a/_DOTween.Assembly/bin/DOTween.dll.mdb and b/_DOTween.Assembly/bin/DOTween.dll.mdb differ
diff --git a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll
index 8c955ef..5c7cd74 100644
Binary files a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll and b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll differ
diff --git a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb
index d761a49..8b6f54e 100644
Binary files a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb and b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb differ
diff --git a/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll b/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll
index 960886b..50c4d3d 100644
Binary files a/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll and b/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll differ
diff --git a/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll.mdb b/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll.mdb
index f2825f0..3f2d7f0 100644
Binary files a/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll.mdb and b/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll.mdb differ