diff --git a/.gitignore b/.gitignore index 45b58a6..97d4962 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,7 @@ zzTestBuilds *.pdb *.DotSettings +UnityTests.Unity2019 UnityTests.Unity5BETA UnityTests.Unity5 - LastVersionBeforeModules ModulesTest.Unity2018 diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML index a176870..9a9e868 100644 --- a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML +++ b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML @@ -360,6 +360,13 @@ DOTween's log behaviour. Default: LogBehaviour.ErrorsOnly + + Used to intercept DOTween's logs. If this method isn't NULL, DOTween will call it before writing a log via Unity's own Debug log methods. + Return TRUE if you want DOTween to proceed with the log, FALSE otherwise. + This method must return a bool and accept two parameters: + - LogType: the type of Unity log that DOTween is trying to log + - object: the log message that DOTween wants to log + If TRUE draws path gizmos in Unity Editor (if the gizmos button is active). Deactivate this if you want to avoid gizmos overhead while in Unity Editor diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll index 564fbe5..df4f9e0 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb index 695f8f4..40eb501 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll index f99f7b9..cd66d53 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb index f81bb08..83887aa 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll index df18ee0..c9811f3 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll.mdb index 8c31c87..f629e1d 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll.mdb differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquare.png.meta b/UnityTests.Unity5/Assets/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquare.png.meta index d88caa6..f0048b5 100644 --- a/UnityTests.Unity5/Assets/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquare.png.meta +++ b/UnityTests.Unity5/Assets/Demigiant/DemiLib/Core/Editor/Imgs/whiteSquare.png.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: d3e15b806a8368742ba6f10e794d7b76 -timeCreated: 1552647154 +timeCreated: 1557580623 licenseType: Pro TextureImporter: fileIDToRecycleName: {} diff --git a/UnityTests.Unity5/Assets/Resources/DOTweenSettings.asset b/UnityTests.Unity5/Assets/Resources/DOTweenSettings.asset index 8e2713b..f1c9906 100644 Binary files a/UnityTests.Unity5/Assets/Resources/DOTweenSettings.asset and b/UnityTests.Unity5/Assets/Resources/DOTweenSettings.asset differ diff --git a/UnityTests.Unity5/Assets/_Tests/OnWillLog.cs b/UnityTests.Unity5/Assets/_Tests/OnWillLog.cs new file mode 100644 index 0000000..81c8e0a --- /dev/null +++ b/UnityTests.Unity5/Assets/_Tests/OnWillLog.cs @@ -0,0 +1,26 @@ +using System.Collections; +using System.Collections.Generic; +using DG.Tweening; +using UnityEngine; + +public class OnWillLog : BrainBase +{ + public bool allowLogs = false; + public Transform target; + + IEnumerator Start() + { + DOTween.onWillLog = OnWillLogCallback; + yield return new WaitForSeconds(0.5f); + + target.DOMoveX(3, 2); + yield return new WaitForSeconds(0.5f); + Destroy(target.gameObject); + } + + bool OnWillLogCallback(LogType logType, object message) + { + Debug.Log("LOG CAUGHT > " + logType + " > " + message); + return allowLogs; + } +} \ No newline at end of file diff --git a/UnityTests.Unity5/Assets/_Tests/OnWillLog.cs.meta b/UnityTests.Unity5/Assets/_Tests/OnWillLog.cs.meta new file mode 100644 index 0000000..03b6628 --- /dev/null +++ b/UnityTests.Unity5/Assets/_Tests/OnWillLog.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1d90e8eb596935b46bbb9ad32c9d62e8 +timeCreated: 1559473596 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityTests.Unity5/Assets/_Tests/OnWillLog.unity b/UnityTests.Unity5/Assets/_Tests/OnWillLog.unity new file mode 100644 index 0000000..44389f7 Binary files /dev/null and b/UnityTests.Unity5/Assets/_Tests/OnWillLog.unity differ diff --git a/UnityTests.Unity5/Assets/_Tests/OnWillLog.unity.meta b/UnityTests.Unity5/Assets/_Tests/OnWillLog.unity.meta new file mode 100644 index 0000000..7fb8b1e --- /dev/null +++ b/UnityTests.Unity5/Assets/_Tests/OnWillLog.unity.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 46c67c20a3e9b3f4e8d3b6a9f7dcbfc7 +DefaultImporter: + userData: diff --git a/UnityTests.Unity5/Assets/_Tests/TempTests.cs b/UnityTests.Unity5/Assets/_Tests/TempTests.cs index 5cd44b2..1342011 100644 --- a/UnityTests.Unity5/Assets/_Tests/TempTests.cs +++ b/UnityTests.Unity5/Assets/_Tests/TempTests.cs @@ -11,24 +11,20 @@ using UnityEngine.UI; public class TempTests : BrainBase { - public enum TestEnum { - A, - B, - C, - D, - E, - z = 100 - } - - public TestEnum testEnum; + public bool useFrom = true; public Transform target; - public Transform rotTarget; - public Ease easeType = Ease.Linear; IEnumerator Start() { - yield return new WaitForSeconds(1); + if (!useFrom) { + target.DOMoveX(2, 2); + } else { + Vector3 currentPosition = target.position; + target.DOMoveX(2, 2).From().SetAutoKill(false);//.OnRewind(() => OnResetTransformFrom(transformToAnimate,currentPosition)); + } - target.DORotateQuaternion(rotTarget.rotation, 2).SetEase(easeType); + yield return new WaitForSeconds(3f); + + target.DORewind(); } } \ No newline at end of file diff --git a/UnityTests.Unity5/Assets/_Tests/TempTests.unity b/UnityTests.Unity5/Assets/_Tests/TempTests.unity index 8c477c3..8ea68a2 100644 Binary files a/UnityTests.Unity5/Assets/_Tests/TempTests.unity and b/UnityTests.Unity5/Assets/_Tests/TempTests.unity differ diff --git a/_DOTween.Assembly/DOTween/Core/Debugger.cs b/_DOTween.Assembly/DOTween/Core/Debugger.cs index 34b1e96..f7d8c21 100644 --- a/_DOTween.Assembly/DOTween/Core/Debugger.cs +++ b/_DOTween.Assembly/DOTween/Core/Debugger.cs @@ -21,20 +21,28 @@ namespace DG.Tweening.Core public static void Log(object message) { - Debug.Log(_LogPrefix + message); + message = _LogPrefix + message; + if (DOTween.onWillLog != null && !DOTween.onWillLog(LogType.Log, message)) return; + Debug.Log(message); } public static void LogWarning(object message) { - Debug.LogWarning(_LogPrefix + message); + message = _LogPrefix + message; + if (DOTween.onWillLog != null && !DOTween.onWillLog(LogType.Warning, message)) return; + Debug.LogWarning(message); } public static void LogError(object message) { - Debug.LogError(_LogPrefix + message); + message = _LogPrefix + message; + if (DOTween.onWillLog != null && !DOTween.onWillLog(LogType.Error, message)) return; + Debug.LogError(message); } public static void LogReport(object message) { - Debug.Log(string.Format("{0} REPORT ► {1}", _LogPrefix, message)); + message = string.Format("{0} REPORT ► {1}", _LogPrefix, message); + if (DOTween.onWillLog != null && !DOTween.onWillLog(LogType.Log, message)) return; + Debug.Log(message); } public static void LogInvalidTween(Tween t) diff --git a/_DOTween.Assembly/DOTween/DOTween.cs b/_DOTween.Assembly/DOTween/DOTween.cs index 6fcbd0b..6bbb998 100644 --- a/_DOTween.Assembly/DOTween/DOTween.cs +++ b/_DOTween.Assembly/DOTween/DOTween.cs @@ -4,6 +4,8 @@ // License Copyright (c) Daniele Giardini. // This work is subject to the terms at http://dotween.demigiant.com/license.php + +using System; #if COMPATIBLE using DOVector2 = DG.Tweening.Core.Surrogates.Vector2Wrapper; using DOVector3 = DG.Tweening.Core.Surrogates.Vector3Wrapper; @@ -32,7 +34,7 @@ namespace DG.Tweening public class DOTween { /// DOTween's version - public static readonly string Version = "1.2.245"; // Last version before modules: 1.1.755 + public static readonly string Version = "1.2.250"; // Last version before modules: 1.1.755 /////////////////////////////////////////////// // Options //////////////////////////////////// @@ -71,6 +73,12 @@ namespace DG.Tweening set { _logBehaviour = value; Debugger.SetLogPriority(_logBehaviour); } } static LogBehaviour _logBehaviour = LogBehaviour.ErrorsOnly; + /// Used to intercept DOTween's logs. If this method isn't NULL, DOTween will call it before writing a log via Unity's own Debug log methods. + /// Return TRUE if you want DOTween to proceed with the log, FALSE otherwise. + /// This method must return a bool and accept two parameters: + /// - LogType: the type of Unity log that DOTween is trying to log + /// - object: the log message that DOTween wants to log + public static Func onWillLog; /// If TRUE draws path gizmos in Unity Editor (if the gizmos button is active). /// Deactivate this if you want to avoid gizmos overhead while in Unity Editor public static bool drawGizmos = true; diff --git a/_DOTween.Assembly/bin/DOTween.XML b/_DOTween.Assembly/bin/DOTween.XML index a176870..9a9e868 100644 --- a/_DOTween.Assembly/bin/DOTween.XML +++ b/_DOTween.Assembly/bin/DOTween.XML @@ -360,6 +360,13 @@ DOTween's log behaviour. Default: LogBehaviour.ErrorsOnly + + Used to intercept DOTween's logs. If this method isn't NULL, DOTween will call it before writing a log via Unity's own Debug log methods. + Return TRUE if you want DOTween to proceed with the log, FALSE otherwise. + This method must return a bool and accept two parameters: + - LogType: the type of Unity log that DOTween is trying to log + - object: the log message that DOTween wants to log + If TRUE draws path gizmos in Unity Editor (if the gizmos button is active). Deactivate this if you want to avoid gizmos overhead while in Unity Editor diff --git a/_DOTween.Assembly/bin/DOTween.dll b/_DOTween.Assembly/bin/DOTween.dll index 564fbe5..df4f9e0 100644 Binary files a/_DOTween.Assembly/bin/DOTween.dll and b/_DOTween.Assembly/bin/DOTween.dll differ diff --git a/_DOTween.Assembly/bin/DOTween.dll.mdb b/_DOTween.Assembly/bin/DOTween.dll.mdb index 695f8f4..40eb501 100644 Binary files a/_DOTween.Assembly/bin/DOTween.dll.mdb and b/_DOTween.Assembly/bin/DOTween.dll.mdb differ diff --git a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll index f99f7b9..cd66d53 100644 Binary files a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll and b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll differ diff --git a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb index f81bb08..83887aa 100644 Binary files a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb and b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb differ diff --git a/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll b/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll index df18ee0..c9811f3 100644 Binary files a/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll and b/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll differ diff --git a/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll.mdb b/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll.mdb index 8c31c87..f629e1d 100644 Binary files a/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll.mdb and b/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll.mdb differ