forked from Demigiant/dotween
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed allocations happening when a tween was killed (because C# was…
… erroneously converting a line of code into an Activator.CreateInstance)
- Loading branch information
Showing
53 changed files
with
106 additions
and
5 deletions.
There are no files selected for viewing
Binary file modified
BIN
+512 Bytes
(100%)
UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll
Binary file not shown.
Binary file modified
BIN
+82 Bytes
(100%)
UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll.mdb
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll.mdb
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll.mdb
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll.mdb
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+82 Bytes
(100%)
UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll.mdb
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll.mdb
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll.mdb
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+82 Bytes
(100%)
UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll.mdb
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll.mdb
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll.mdb
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using UnityEngine.Profiling; | ||
using UnityEditor; | ||
using DG.Tweening; | ||
|
||
public class AllocationsTests : BrainBase | ||
{ | ||
public enum AllocationTestType | ||
{ | ||
DOMove, | ||
DOPath | ||
} | ||
|
||
public AllocationTestType testType; | ||
public Transform[] targets; | ||
public Vector3[] wps; | ||
|
||
Tween tween0; | ||
|
||
IEnumerator Start() | ||
{ | ||
DOTween.Init(); | ||
yield return new WaitForSeconds(1); | ||
|
||
switch (testType) { | ||
case AllocationTestType.DOMove: | ||
Profiler.BeginSample("Create tween"); | ||
// Regular move tweens test | ||
Debug.Log("Create tween"); | ||
tween0 = targets[0].DOMoveX(2, 1); | ||
Profiler.EndSample(); | ||
yield return null; | ||
Profiler.BeginSample("Kill tween"); | ||
Debug.Log("Kill tween"); | ||
tween0.Kill(); | ||
Profiler.EndSample(); | ||
|
||
yield return null; | ||
|
||
Profiler.BeginSample("Create tween 2"); | ||
// Regular move tweens test | ||
Debug.Log("Create tween 2"); | ||
tween0 = targets[0].DOMoveX(2, 1); | ||
Profiler.EndSample(); | ||
yield return null; | ||
Profiler.BeginSample("Kill tween 2"); | ||
Debug.Log("Kill tween 2"); | ||
tween0.Kill(); | ||
Profiler.EndSample(); | ||
break; | ||
case AllocationTestType.DOPath: | ||
// Regular move tweens test | ||
Debug.Log("Create tween"); | ||
tween0 = targets[0].DOPath(wps, 1); | ||
yield return null; | ||
Debug.Log("Kill tween"); | ||
tween0.Kill(); | ||
break; | ||
} | ||
|
||
yield return null; | ||
yield return null; | ||
EditorApplication.isPaused = true; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
m_EditorVersion: 5.4.1f1 | ||
m_StandardAssetsVersion: 0 | ||
m_EditorVersion: 5.5.0f3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.