UnityUIPlayables icon indicating copy to clipboard operation
UnityUIPlayables copied to clipboard

Last frame is no work in timeline

Open Bald-Rabbit opened this issue 1 year ago • 3 comments

Last frame and second last frame is same value In play. So I gress last frame is Last frame is no work.

Bald-Rabbit avatar Mar 22 '24 06:03 Bald-Rabbit

Please write down the steps to reproduce the issue.

Haruma-K avatar Mar 31 '24 05:03 Haruma-K

Just open one timeline,and set to last frame. For example, Canvas Group Aniamtion Clip the star value 0 and end value 1, end of animation, the vaue will be 0.99, it not 1. In PlayableBehaviour, the clip last frame intputWeight is 0, maybe it the reason i think.

Bald-Rabbit avatar Apr 01 '24 06:04 Bald-Rabbit

Because in the function AnimationBehavior.EvaluateCurve(), the range of return values for Mathf.Repeat(progress, 1.0f) is [0,1) and will never be equal to 1.

Langdex avatar Jun 23 '24 10:06 Langdex

I apologize for the late response. Regarding the issue where the last frame of the Timeline clip is not evaluated, this is due to the specifications of Unity.

https://forum.unity.com/threads/animation-events-on-last-frame-arent-fired-in-timeline-when-its-the-last-frame-of-the-timeline.791258/

The EvaluateCurve issue pointed out by @Langdex is a separate bug and I will fix it.

Haruma-K avatar Jul 15 '24 03:07 Haruma-K

Regarding the issue where the last frame of the Timeline clip is not evaluated, this is due to the specifications of Unity.

This can also be reproduced with the Unity official asset "Default Playables."

image

Haruma-K avatar Jul 15 '24 04:07 Haruma-K

Because in the function AnimationBehavior.EvaluateCurve(), the range of return values for Mathf.Repeat(progress, 1.0f) is [0,1) and will never be equal to 1.

fixed: https://github.com/Haruma-K/UnityUIPlayables/releases/tag/0.1.3

Haruma-K avatar Jul 15 '24 04:07 Haruma-K