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
Hi. I got an error.
Now, I know how to fix the error. Locate the object with the unset custom curve, fix the curve. But which object has the issue? I can figure out from the stack trace which script has it, but not which object specifically. For me, it happened on a script which is repeated tens of times across the whole scene, located on many different prefabs.
This task would be made significantly easier, if clicking the error message automatically selected the problematic object. So, my proposition is this:
In ReusableTween.cs, in this piece of code:
the contents of the most-nested if, was instead:
var errorMessage = $"Ease type is Ease.Custom, but {nameof(TweenSettings.customEase)} is not configured correctly.";
if (_target is UnityEngine.Object)
{
Debug.LogError(errorMessage, (UnityEngine.Object)_target);
}
else
{
Debug.LogError(errorMessage);
}
_settings.ease = PrimeTweenManager.Instance.defaultEase;
this would provide a link clickable error message to every single object with the issue, while still being fully functional on non-UnityEngine objects.
Similar approach could be used for other error messages as well. This particular one is just the most recent example in my project.
I tested the code I provided on my machine, and it seems to work well.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. I got an error.

Now, I know how to fix the error. Locate the object with the unset custom curve, fix the curve. But which object has the issue? I can figure out from the stack trace which script has it, but not which object specifically. For me, it happened on a script which is repeated tens of times across the whole scene, located on many different prefabs.
This task would be made significantly easier, if clicking the error message automatically selected the problematic object. So, my proposition is this:

In ReusableTween.cs, in this piece of code:
the contents of the most-nested if, was instead:
this would provide a link clickable error message to every single object with the issue, while still being fully functional on non-UnityEngine objects.
Similar approach could be used for other error messages as well. This particular one is just the most recent example in my project.
I tested the code I provided on my machine, and it seems to work well.
Beta Was this translation helpful? Give feedback.
All reactions