1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2025-12-21 01:36:05 +08:00

[BUGFIX] Fixed DOTween creating a new instance during ApplicationQuit if calling DOTween.Kill during Destroy (bug introduced in v1.2.270)

This commit is contained in:
Demigiant 2019-09-30 11:47:27 +02:00
parent 9a96324fa8
commit d2cfdc0d45
17 changed files with 11 additions and 9 deletions

View File

@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: d3e15b806a8368742ba6f10e794d7b76
timeCreated: 1568972667
timeCreated: 1569668746
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}

View File

@ -12,13 +12,13 @@ using UnityEngine.UI;
public class TempTests : BrainBase
{
public Transform target;
public float y = 1;
public AnimationCurve ease;
Tween t;
IEnumerator Start()
{
yield return new WaitForSeconds(0.8f);
target.DOMoveY(y, 2).SetEase(ease);
target.DOBlendablePunchRotation(new Vector3(120, 120, 120), 1);
yield return new WaitForSeconds(0.3f);
Debug.Log(target.eulerAngles);
target.DOBlendablePunchRotation(new Vector3(200, 200, 200), 1);
}
}

View File

@ -16,7 +16,7 @@ namespace DG.Tweening.Core
{
// 0: errors only - 1: default - 2: verbose
public static int logPriority { get { if (!DOTween.initialized) DOTween.Init(); return _logPriority; } }
public static int _logPriority;
static int _logPriority;
const string _LogPrefix = "<color=#0099bc><b>DOTWEEN ► </b></color>";

View File

@ -34,7 +34,7 @@ namespace DG.Tweening
public class DOTween
{
/// <summary>DOTween's version</summary>
public static readonly string Version = "1.2.280"; // Last version before modules: 1.1.755
public static readonly string Version = "1.2.281"; // Last version before modules: 1.1.755
///////////////////////////////////////////////
// Options ////////////////////////////////////

View File

@ -111,6 +111,8 @@ namespace DG.Tweening
/// <param name="complete">If TRUE completes the tween before killing it</param>
public static void Kill(this Tween t, bool complete = false)
{
if (!DOTween.initialized) return; // Called during application quit, ignore
if (t == null) {
if (Debugger.logPriority > 1) Debugger.LogNullTween(t); return;
} else if (!t.active) {

Binary file not shown.