0
Fixed

Unable to get Timeline.Memory() actions working

shottogan 3 years ago updated by Lazlo Bonin (Lead Developer) 3 years ago 11

I'm unable to get the following code to work:

time.Memory(

-2,
false,
delegate() {

print( "forward" );

},
delegate() {

print( "backward" );
clock.LerpTimeScale( 1, 1, true );

}

);

clock.LerpTimeScale( -1, 1, true );


Am I doing something wrong?

Chronos Version:
2.4.7
Unity Version:
5.5.2f1

Answer

+1
Answer

I think I might have found the issue; it's silly, really. In Timeline.cs line 530, change time - delay to time + delay and tell me if that fixes your issue. If it does, I'll make the change official in the next version.

GOOD, I'M SATISFIED
Satisfaction mark by shottogan 3 years ago
Pending Review

Hi Jarod,


What do you mean when you say it doesn't work? At first glance, your first parameter (delay) should be 2, not -2; memories are placed in the past by default.

If my delay isn't negative, I get this error:

ChronosException: Memory occurrences must be in the past.

Oh, my bad then! What would you say "doesn't work" with your code?

The Memory() actions never fire, even though the Timeline successfully plays backwards.

Note that clock is a LocalClock.

+1

Thanks for the report, I'll create a test case and look into it.

Yep, thank you!

Please provide example code once you do :0)

+1
Answer

I think I might have found the issue; it's silly, really. In Timeline.cs line 530, change time - delay to time + delay and tell me if that fixes your issue. If it does, I'll make the change official in the next version.

+1

Success! Thanks so much!! ^_^