Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Industrion · Mar 20, 2015 at 02:03 PM · animationspritelooptimelinekeyframe

Animation Timeline Last Frame Duration

Hi,

I'm struggling to work out what the best approach is for looping simple sprite animations, using the non-legacy animation timeline.

I have an 8-keyframe character run cycle, with each part of the cycle lasting 3 frames, so I have 8 keyframes on my timeline, each 3 units/measurements apart. What should I do with the end of the timeline to make the timing of each frame of the cycle completely equal/uniform?

I know that I could duplicate the first keyframe of the run cycle and place it at the end, 3 frames after the final frame's keyframe, causing the final keyframe to last longer than a single frame, but that makes my first keyframe appear to last longer (because, I guess, it is lasting longer, by one frame).

The solution I currently use is to place an additional keyframe containing the last frame of the run cycle, and place it one frame leftward, making the gap smaller than with every other interval. This means that, on frame 22, I have my new 8th keyframe, and I have it again on frame 24.

I've used Flash quite a lot, so I guess what I'm asking is this: is there a way to specify that a keyframe lasts a certain number of frames, not requiring a repeat keyframe to finish? Or is there a way to specify simply an ending keyframe, whereby the data for that keyframe isn't repeated from the previous keyframe?

The reason I'm fussy about this is (beyond just wanting to do things the right way) I was hoping to have myself or artists make use of the quick method of selecting multiple images from the project pane and dragging them into the timeline, without having to perform this extra step each time, which I feel might be a workaround of mine and not the correct approach.

Thanks

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Wiki

Answer by prossel · May 19, 2015 at 07:14 PM

You can add an event to the end of the animation and move it past the last keyframe.

This will extend the last keyframe duration to the event.

No need to select a function if you don't want but you will probably get the error:

 'YourAnimationName' AnimationEvent has no function name specified!

To avoid the error, add a dummy function to a script on the GameObject and select it for the event.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Is there a way to make keyframes of an animation conditional? 1 Answer

How to set the duration of a looping animation from the inspector? 5 Answers

Blender Animation Looping Delay Problem 2 Answers

SpriteManager 2 1 Answer

How to do you import Spriter animations into Unity? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges