"Tween startup failed" warning despite "Safe Mode" and "Errors Only" Log Behaviour
In my DOTween Utility Panel, I have these settings:
- Safe Mode: On
- Log Behaviour set to "Errors Only".
However, I'm still getting this warning message:
<color=#0099bc><b>DOTWEEN ► </b></color>Tween startup failed (NULL target/property - Vector3 get_localScale()): the tween will now be killed ► The object of type 'RectTransform' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Debug:LogWarning(Object)
DG.Tweening.Core.Debugger:LogWarning(Object) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/Debugger.cs:28)
DG.Tweening.Tweener:DoStartup(TweenerCore`3) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Tweener.cs:137)
DG.Tweening.Core.TweenerCore`3:Startup() (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/TweenerCore.cs:168)
DG.Tweening.Tween:DoGoto(Tween, Single, Int32, UpdateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Tween.cs:194)
DG.Tweening.Core.TweenManager:Goto(Tween, Single, Boolean, UpdateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/TweenManager.cs:666)
DG.Tweening.Sequence:ApplyInternalCycle(Sequence, Single, Single, UpdateMode, Boolean, Boolean, Boolean) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Sequence.cs:325)
DG.Tweening.Sequence:DoApplyTween(Sequence, Single, Int32, Int32, Boolean, UpdateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Sequence.cs:240)
DG.Tweening.Sequence:ApplyTween(Single, Int32, Int32, Boolean, UpdateMode, UpdateNotice) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Sequence.cs:143)
DG.Tweening.Tween:DoGoto(Tween, Single, Int32, UpdateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Tween.cs:252)
DG.Tweening.Core.TweenManager:Update(UpdateType, Single, Single) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/TweenManager.cs:450)
DG.Tweening.Core.DOTweenComponent:Update() (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/DOTweenComponent.cs:71)
(I'm on version DOTween v1.2.135 (Pro v1.0.075) from Oct 15, 2018. I haven't tested the latest version but I didn't see anything in the changelog or the issue tracker about this.)
How can I disable these warnings? I want to rely on "Safe Mode" and I don't want to have to fix every instance of this warning in my application. Thanks!
Details
I've investigated a bit to see why this warning was being logged despite "errors only" log behaviour being set.
In my project's DoTweenSettings.asset setting file (in my project's Assets/Resources folder), logBehaviour is set to 2 (which corresponds to LogBehaviour.ErrorsOnly)
In DOTween's Debugger.cs, I see LogBehaviour.ErrorsOnly ("2") should be mapped to a log priority of int value 0 :
public enum LogBehaviour
{
/// <summary>Log only warnings and errors</summary>
Default,
/// <summary>Log warnings, errors and additional infos</summary>
Verbose,
/// <summary>Log only errors</summary>
ErrorsOnly
}
public static void SetLogPriority(LogBehaviour logBehaviour)
{
switch (logBehaviour) {
case LogBehaviour.Default:
logPriority = 1;
break;
case LogBehaviour.Verbose:
logPriority = 2;
break;
default:
logPriority = 0;
break;
}
}
In DOTween's Tweener.DoStartup method, I see this block of code:
if (DOTween.useSafeMode) {
try {
t.startValue = t.tweenPlugin.ConvertToStartValue(t, t.getter());
} catch (Exception e) {
if (Debugger.logPriority >= 1) {
Debugger.LogWarning(string.Format(
"Tween startup failed (NULL target/property - {0}): the tween will now be killed ► {1}", e.TargetSite, e.Message
));
}
return false; // Target/field doesn't exist: kill tween
}
}
With a log priority of 0, this shouldn't be hitting the Debugger.LogWarning line... but I still see this warning in my project...?

Hi,
You're watching the code in the repo, and the website download is not up to date because I haven't yet released this last version. That warning is indeed a leftover and will be fixed in the next release (coming this weekend probably) :)
I'm getting this same error but only on build using the most recent asset store version of DOTween Pro
@aidanwolf This is very weird, can you show me the full log message, and tell me what version of DOTween and DOTween Pro you see in DOTween Utility Panel (just to be on the safe side :P).
Hey there, I'm getting this error too, I have DoTween Pro Version 1.0.244, release build v1.2.420, I've set it via UtilityPanel and via code before the first usage of DoTween to ErrorOnly, but it still logs me warnings.
The error is still there, i got the latest free asset from the unity store.
same same