mirror of
https://github.com/Cardidi/dotween-upm-fork.git
synced 2025-12-20 01:06:02 +08:00
Implemented clearing of DOTween when exiting playMode or destroying the DOTweenComponent object, in order to allow the new 2019.3 alpha playmode options to work
This commit is contained in:
parent
c8cc8dc6a7
commit
9926fde367
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7af705b727a21a440bee9c5f40033da9
|
||||
timeCreated: 1564740547
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d3e15b806a8368742ba6f10e794d7b76
|
||||
timeCreated: 1557580623
|
||||
timeCreated: 1565912005
|
||||
licenseType: Pro
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
|
||||
@ -12,18 +12,13 @@ using UnityEngine.UI;
|
||||
public class TempTests : BrainBase
|
||||
{
|
||||
public Transform target;
|
||||
public float y = 1;
|
||||
public AnimationCurve ease;
|
||||
|
||||
IEnumerator Start()
|
||||
{
|
||||
yield return new WaitForSeconds(0.8f);
|
||||
|
||||
Sequence s = DOTween.Sequence();
|
||||
// s.Append(target.DOMoveX(2, 1));
|
||||
s.AppendCallback(() => {
|
||||
Debug.Log("Gonna pause here");
|
||||
s.Pause();
|
||||
})
|
||||
.AppendCallback(() => Debug.Log("Will move Y"))
|
||||
.Append(target.DOMoveY(2, 1));
|
||||
target.DOMoveY(y, 2).SetEase(ease);
|
||||
}
|
||||
}
|
||||
@ -157,7 +157,9 @@ namespace DG.Tweening.Core
|
||||
|
||||
// DOTween.initialized = false;
|
||||
// DOTween.instance = null;
|
||||
|
||||
if (DOTween.instance == this) DOTween.instance = null;
|
||||
DOTween.Clear(true);
|
||||
}
|
||||
|
||||
// Detract/reapply pause time from/to unscaled time
|
||||
@ -170,10 +172,12 @@ namespace DG.Tweening.Core
|
||||
}
|
||||
}
|
||||
|
||||
void OnApplicationQuit()
|
||||
{
|
||||
DOTween.isQuitting = true;
|
||||
}
|
||||
// Commented this out because it interferes with Unity 2019.3 "no domain reload" experimental playmode
|
||||
// (now I clear DOTween completely when the DOTween component is destroyed which allows this to be commented out)
|
||||
// void OnApplicationQuit()
|
||||
// {
|
||||
// DOTween.isQuitting = true;
|
||||
// }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@ -414,7 +414,7 @@ namespace DG.Tweening.Core
|
||||
if (t == null || t.updateType != updateType) continue; // Wrong updateType or was added to a Sequence (thus removed from active list) while inside current updateLoop
|
||||
if (_totTweenLinks > 0) EvaluateTweenLink(t); // TweenLinks
|
||||
if (!t.active) {
|
||||
// Manually killed by another tween's callback
|
||||
// Manually killed by another tween's callback or deactivated by the TweenLink evaluation
|
||||
willKill = true;
|
||||
MarkForKilling(t);
|
||||
continue;
|
||||
|
||||
@ -34,7 +34,7 @@ namespace DG.Tweening
|
||||
public class DOTween
|
||||
{
|
||||
/// <summary>DOTween's version</summary>
|
||||
public static readonly string Version = "1.2.265"; // Last version before modules: 1.1.755
|
||||
public static readonly string Version = "1.2.270"; // Last version before modules: 1.1.755
|
||||
|
||||
///////////////////////////////////////////////
|
||||
// Options ////////////////////////////////////
|
||||
|
||||
@ -40,6 +40,7 @@ set CopyToDir=%1..\..\bin.Global\%5%SubDir%
|
||||
set CopyToDirNoMeta=%1..\..\bin.Global_no_meta\%5%SubDir%
|
||||
set CopyToDirUnityTests=%1..\UnityTests.Unity4\Assets\Demigiant\%5%SubDir%
|
||||
set CopyToDirUnity5Tests=%1..\UnityTests.Unity5\Assets\Demigiant\%5%SubDir%
|
||||
set CopyToDirUnity2019Tests=%1..\UnityTests.Unity2019\Assets\Demigiant\%5%SubDir%
|
||||
set CopyToDirCompatibilityTests=%1..\UnityCompatibilityTests.Unity35\Assets\Demigiant\%5%SubDir%
|
||||
set CopyToDirExtPluginsTests=%1..\ExternalPluginsTestsAndExamples.Unity5\Assets\Demigiant\%5%SubDir%
|
||||
set CopyToDirModulesTest=%1..\ModulesTest.Unity2018\Assets\Demigiant\%5%SubDir%
|
||||
@ -53,6 +54,10 @@ echo f | xcopy %CopyFromDir% %CopyToDirModulesTest% /Y /I /E
|
||||
:: bin.Global_no_meta
|
||||
echo ::: Exporting from %CopyFromDir% to %CopyToDirNoMeta%
|
||||
echo f | xcopy %CopyFromDir% %CopyToDirNoMeta% /Y /I /E
|
||||
:: UnityTests.Unity2019
|
||||
echo ::: Exporting from %CopyFromDir% to %CopyToDirUnity2019Tests%
|
||||
echo f | xcopy %CopyFromDir% %CopyToDirUnity2019Tests% /Y /I /E
|
||||
exit /B
|
||||
:: UnityTests.Unity5
|
||||
echo ::: Exporting from %CopyFromDir% to %CopyToDirUnity5Tests%
|
||||
echo f | xcopy %CopyFromDir% %CopyToDirUnity5Tests% /Y /I /E
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user