You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an error occurs during a tween callback (such as when setting the value through from a Custom tween, or calling an onComplete), PrimeTween helpfully shows the stack trace up to that point, but it is not clickable.
And the log can be really dense.
I think a simple Debug.LogException(e) should do it! It will then give the full stack trace of the code that caused the exception.
Somewhere in these lines:
try{_onValueChange(_target,val);}catch(Exceptione){Assert.LogError($"Tween was stopped because of exception in {nameof(onValueChange)} callback, tween: {_tween.GetDescription()}, exception:\n{e}\n",_tween.id,_tween.targetasUnityEngine.Object);_tween.EmergencyStop();}
Note that I'm not talking about the "creation stack trace", which is also very handy! But honestly most of the time I just want to click into the valueChanged / onTweenComplete callback code that caused the exception in the first place.
The text was updated successfully, but these errors were encountered:
noio
changed the title
[feature] Use LogException to make Tween exception stack traces clickable
Tween exception stack traces are not clickable
Oct 16, 2024
When an error occurs during a tween callback (such as when setting the value through from a Custom tween, or calling an onComplete), PrimeTween helpfully shows the stack trace up to that point, but it is not clickable.
And the log can be really dense.
I think a simple
Debug.LogException(e)
should do it! It will then give the full stack trace of the code that caused the exception.Somewhere in these lines:
Note that I'm not talking about the "creation stack trace", which is also very handy! But honestly most of the time I just want to click into the valueChanged / onTweenComplete callback code that caused the exception in the first place.
The text was updated successfully, but these errors were encountered: