Demigiant Forum

Unity Assets => DOTween & DOTween Pro => Topic started by: cem on November 18, 2015, 03:14:29 PM

Title: CHRONOS support, kinda works ... but ..
Post by: cem on November 18, 2015, 03:14:29 PM
I have the following Tween :
Code: [Select]
transform.DOMoveY(NY, Random.Range(1,2), false).SetEase(Ease.InSine).OnUpdate(setFalling).OnComplete(playSound).RegisterChronosTimeline(time);

where RegisterChronosTimeline is:
Code: [Select]
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 object

But 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 !
Title: Re: CHRONOS support, kinda works ... but ..
Post by: Daniele on November 18, 2015, 04:34:21 PM
Hellow!

Other than "timeline" being NULL, the only other thing that might be happening is that it's an inner exception thrown by Chronos when setting the timeScale. Are you using the latest-est version of DOTween (here (http://dotween.demigiant.com/download.php))? That should give you more information about the type of exception.

Cheers,
Daniele