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 halfpint101 · Jan 29, 2014 at 02:37 AM · 4.3

Unity 4.3.3 Animation AddClip length is always 1 Second

When adding animations to a model in code using animations AddClip the animations created are always 1 second long. When played, when viewed in the inspector but not when created. It works currently under 4.2.2 but not under 4.3.3 ( or any 4.3 version ). The animation still works but simply only lasts one second. Have looked on the answers and forums but cant find a solution and no posts seem to be recent.

We use this for all our animations and would rather not use the inspector to add all our clips so finding a solution for this would be ideal.

Code:

cachedAnimation.AddClip(cachedAnimation.clip, animationName, startFrame, endFrame);

If you want to reproduce it just... 1. Import a model with a single take 2. Create a clip using add clip 3. Play the animation using animation.Play(...) 4. Make sure the model is using legacy mode and not mecanim

Comment
Add comment · Show 2
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
avatar image ajohnson223 · Jan 20, 2015 at 12:29 AM 0
Share

This was listed as fixed for Unity 4.5: http://unity3d.com/unity/whats-new/unity-4.5 "Fixed AnimationClip.Length always returning 1 for all player."

(Oddly, it's listed under "$$anonymous$$ecanim Fixes", but this bug applies to Legacy Animation system as well)

Unfortunately, the bug exists in the latest version of Unity 4.6, and when using Legacy Animation system, after adding a clip as described above, the clip length will always play for only one second, and the inspector will show the clip as being only 1 second long. Either the fix was never carried over into the 4.6.x releases, or the bug was never actually fixed in the first place.

Please rectify this soon in Unity 4.6! I haven't tested 5.x but I wouldn't be surprised if the bug exists there as well, so please fix it there if it does.

Thanks.

avatar image TerraViper-5 · Jan 25, 2015 at 11:25 PM 0
Share

Just found this post after one hour of debugging... Yeah, please fix this. Is there any workaround?

0 Replies

· Add your reply
  • Sort: 

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

21 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity 4.3 - Won't Build in Xcode : __curOrientation 3 Answers

Concurrent Animations using an Animator? 0 Answers

Importing blend shape animations from Blender 2 Answers

What has changed in the WWW class? What am I doing wrong? 0 Answers

Movement on all projects/games are moving on their own. 0 Answers


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