• Unity
  • Animation doesn't reset when it loops

Related Discussions
...

I made some short Tutorial animations that are supposed to loop and play again for as long as the user wants to, the animation loop looks fine in the playback or when exporting to AVI however when implemented as JSON in Unity some elements mess up from the second run of the loop. Attach image for instance doesn't reset to the initial state once the loop begins again, Help please! :sweat: :sweat:

This isn't necessary in some cases, especially in properly posed loops where the last value is exactly the same as the first, but did you make sure you added keys to the start of the animation?

To do this, in the editor, you can select frame 0 and press CTRL+SHIFT+L This will make sure all existing dopesheet items have keys at that point in time.

Pharan wrote

This isn't necessary in some cases, especially in properly posed loops where the last value is exactly the same as the first, but did you make sure you added keys to the start of the animation?

To do this, in the editor, you can select frame 0 and press CTRL+SHIFT+L This will make sure all existing dopesheet items have keys at that point in time.

Thanks for the reply Pharan! I noticed this may happen with elements that are not shown from the Setup stage and have Attachment state changed to shown during the animation but no initial "Not Shown" at the beginning in the Dopesheet. Is there a way like CTRL + SHIFT + L that creates keys only for the Attachment tool?

I don't think there is. You can use the dopesheet Filter menu but the Key Dopesheet (CTRL+SHIFT+L) shortcut still applies it to all.

Is there a reason why you only want this for attachments?

Well, I'm basically replicating gameplay elements in this tutorial animations, some elements do not need to be seen until a certain time in the dopesheet. Also to apply the same animation to an attachment I often assign several attachments to a slot and just show one or the other to keep things non convoluted