Search Unity

Last frame of a clip

Discussion in 'Animation' started by erre-rox, May 14, 2018.

  1. erre-rox

    erre-rox

    Joined:
    Dec 3, 2012
    Posts:
    23
    Hi all,

    I have a simple Animation Clip which have 10 key frame that set Light Intensity on a Spot Light.

    I've done a simple setup with 2 states:
    • Idle: No clip is assigned in this state and Write Defaults is False.
    • Animation: There is a clip (not looping). This state has a transition to Idle State with Exit Time set to 1 and Transition Duration is 0.
    My expected result is that whenever I force Animation state on that object, the clip is fully played and then it goes to Idle state leaving all parameters with the values of the last frame of previous animation.

    But I saw that every time I play the animation (play is done with CrossFade with 0f as duration), it ends the clip and return to idle with different values any time.

    How is it possible? Every frame of the clip should be always played, right?

    I found this on Internet:

    https://issuetracker.unity3d.com/is...ed-if-there-is-a-transition-to-next-animation

    But I'm using Unity 2017.3.1p4. Anyone has encountered this problem yet?

    Thank you all for help.

    It's really appreciated.

    Best regards,
    Andrea