I have the following Tween :
transform.DOMoveY(NY, Random.Range(1,2), false).SetEase(Ease.InSine).OnUpdate(setFalling).OnComplete(playSound).RegisterChronosTimeline(time);
where RegisterChronosTimeline is:
using Chronos;
using DG.Tweening;
public static class MyExtensions
{
public static void RegisterChronosTimeline(this Tween tween, Timeline timeline)
{
tween.OnUpdate(()=> tween.timeScale = timeline.timeScale);
}
}
But i have the following Warning:
DOTWEEN :: An error inside a tween callback was silently taken care of > Object reference not set to an instance of an objectBut i've checked; 'time' is not null, it's defined in the Chronos Class.
(i basically did this one :
https://github.com/Demigiant/dotween/issues/19)
What's wrong here ?
Glad if someone can help me out;
Thanks !