*

cem

  • *
  • 5
    • View Profile
CHRONOS support, kinda works ... but ..
« 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 !

*

Daniele

  • Dr. Admin, I presume
  • *****
  • 378
    • View Profile
    • Demigiant
Re: CHRONOS support, kinda works ... but ..
« Reply #1 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)? That should give you more information about the type of exception.

Cheers,
Daniele