1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2025-12-20 01:06:02 +08:00

[BUGFIX] Prevented Debugger from initializing DOTween (which would re-create it on application quit and other occasions, in some cases)

This commit is contained in:
Demigiant 2019-10-09 20:17:42 +02:00
parent d2cfdc0d45
commit 7553187f79
15 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,9 @@ namespace DG.Tweening.Core
public static class Debugger
{
// 0: errors only - 1: default - 2: verbose
public static int logPriority { get { if (!DOTween.initialized) DOTween.Init(); return _logPriority; } }
// Commented this to prevent DOTween.Init being called by eventual logs that might happen during ApplicationQuit
// public static int logPriority { get { if (!DOTween.initialized) DOTween.Init(); return _logPriority; } }
public static int logPriority { get { return _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.281"; // Last version before modules: 1.1.755
public static readonly string Version = "1.2.282"; // Last version before modules: 1.1.755
///////////////////////////////////////////////
// Options ////////////////////////////////////

View File

@ -111,8 +111,6 @@ 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.