-
Notifications
You must be signed in to change notification settings - Fork 310
Open
Description
I'm having an issue, for the first play through of the animation all 4 of my events are called. But after the animation loops only one event gets called per loop.
I think the issue is with the Loop mode in AnimationInstancing.cs, method "UpdateAnimation();".
I think when the curFrame is reset to the start of the animatino"UpdateAnimationEvent()" is still comparing the last event from the previous loop.
So it only cycles through one event per loop?
I think I have fixed it by setting aniEvent and eventIndex to null and -1 when resetting the loop. It also affects the PingPong Wrapmode
case WrapMode.Loop:
{
if (curFrame < 0f)
curFrame += (totalFrame - 1);
else if (curFrame > totalFrame - 1)
{
curFrame -= (totalFrame-1);
aniEvent = null;
eventIndex = -1;
}
break;
Manmellon
Metadata
Metadata
Assignees
Labels
No labels