Skip to content

Commit

Permalink
[bugfix] Slightly modified and implemented Andrey Timofeev's fix for …
Browse files Browse the repository at this point in the history
…new IndexOutOfRangeException
  • Loading branch information
Demigiant committed Oct 26, 2016
1 parent 85b2efd commit 1b2b216
Show file tree
Hide file tree
Showing 52 changed files with 39 additions and 13 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll.mdb
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll.mdb
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll.mdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll.mdb
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll.mdb
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll.mdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Resources/DOTweenSettings.asset
Binary file not shown.
30 changes: 28 additions & 2 deletions UnityTests.Unity5/Assets/_Tests/TempTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,34 @@

public class TempTests : BrainBase
{
public void OnComplete()
private int killCounter = 0;

private void Awake()
{
DOTween.Init(true, true, LogBehaviour.Verbose);
DOTween.SetTweensCapacity(200, 125);
}

private void Start()
{
const float Delay = 2;
DOTween.Sequence().AppendInterval(Delay).OnKill(OnKill);
DOTween.Sequence().AppendInterval(Delay).OnKill(OnKill);
}

private void OnKill()
{
if (++killCounter == 2)
StartCoroutine(Coroutine());
}

private IEnumerator Coroutine()
{
Debug.Log("ON COMPLETE");
Sequence sequence = DOTween.Sequence().AppendInterval(2).OnKill(() => { });

yield return new WaitForSeconds(1);

Debug.Log("sequence.Kill()");
sequence.Kill(); // IndexOutOfRangeException
}
}
Binary file modified UnityTests.Unity5/Assets/_Tests/TempTests.unity
Binary file not shown.
Binary file modified UnityTests.Unity5/ProjectSettings/GraphicsSettings.asset
Binary file not shown.
Binary file modified UnityTests.Unity5/ProjectSettings/ProjectSettings.asset
Binary file not shown.
2 changes: 1 addition & 1 deletion UnityTests.Unity5/ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
m_EditorVersion: 5.4.0f3
m_EditorVersion: 5.4.1f1
m_StandardAssetsVersion: 0
14 changes: 5 additions & 9 deletions _DOTween.Assembly/DOTween/Core/TweenManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,7 @@ internal static int Validate()
}
// Kill all eventually marked tweens
if (totInvalid > 0) {
DespawnTweens(_KillList, false);
int count = _KillList.Count - 1;
for (int i = count; i > -1; --i) RemoveActiveTween(_KillList[i]);
DespawnActiveTweens(_KillList);
_KillList.Clear();
}
return totInvalid;
Expand Down Expand Up @@ -413,9 +411,7 @@ internal static void Update(UpdateType updateType, float deltaTime, float indepe
// Do not despawn tweens again, since Kill/DespawnAll was already called
_despawnAllCalledFromUpdateLoopCallback = false;
} else {
DespawnTweens(_KillList, false);
int count = _KillList.Count - 1;
for (int i = count; i > -1; --i) RemoveActiveTween(_KillList[i]);
DespawnActiveTweens(_KillList);
}
_KillList.Clear();
}
Expand Down Expand Up @@ -833,10 +829,10 @@ static void ReorganizeActiveTweens()
_reorganizeFromId = -1;
}

static void DespawnTweens(List<Tween> tweens, bool modifyActiveLists = true)
static void DespawnActiveTweens(List<Tween> tweens)
{
int count = tweens.Count;
for (int i = 0; i < count; ++i) Despawn(tweens[i], modifyActiveLists);
int count = tweens.Count - 1;
for (int i = count; i > -1; --i) Despawn(tweens[i]);
}

// Removes a tween from the active list, reorganizes said list
Expand Down
2 changes: 1 addition & 1 deletion _DOTween.Assembly/DOTween/DOTween.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace DG.Tweening
public class DOTween
{
/// <summary>DOTween's version</summary>
public static readonly string Version = "1.1.330";
public static readonly string Version = "1.1.340";

///////////////////////////////////////////////
// Options ////////////////////////////////////
Expand Down
1 change: 1 addition & 0 deletions _DOTween.Assembly/bin/DOTween.XML

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified _DOTween.Assembly/bin/DOTween.dll
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween.dll.mdb
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween43.dll
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween43.dll.mdb
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween46.dll
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween46.dll.mdb
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween50.dll
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween50.dll.mdb
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/Editor/DOTweenEditor.dll
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb
Binary file not shown.

0 comments on commit 1b2b216

Please sign in to comment.