Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Picc_Excellence · Mar 25, 2016 at 11:32 AM · animationarrayindex1st personindexoutofrangeexception

Has anyone seen this error before: IndexOutOfRangeException: Array index is out of range. UnityEditorInternal....

Has anyone seen this error before: IndexOutOfRangeException: Array index is out of range. UnityEditorInternal.AnimationWindowUtility.AddClipToAnimatorComponent (UnityEngine.Animator animator, UnityEngine.AnimationClip newClip) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationWindowUtility.cs:536) UnityEditorInternal.AnimationWindowUtility.AddClipToAnimationPlayerComponent (UnityEngine.Component animationPlayer, UnityEngine.AnimationClip newClip) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationWindowUtility.cs:516) ?

This happens when I try to create an animation on a flap of a sterile gloves package that I made in Blender. The only examples I found of the IndexOutOfRangeException were on peoples scripts but mine is on a internal animation script in the Unity 5 engine... or so it appears. If anyone has any tips or need more info from me please ask because I really need this flap to rotate open...

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Picc_Excellence · Apr 16, 2016 at 08:58 AM

Thanks to both of you for trying and sorry for the super delayed solve response... We're trying to convert to WebGL (helps us all.) Updating Unity solved the issue so the world may never know.

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
avatar image
2

Answer by Bunny83 · Mar 25, 2016 at 12:03 PM

Hmm, the only thing i've found in the AddClipToAnimatorComponent method that could possible throw this error is this line

 ChildAnimatorState childAnimatorState = animatorController.layers[0].stateMachine.FindState(newClip.name);

It simply gets the first layer on the animatorController, however it seems your layers array is empty. Your Animator statemachine should have at least one layer.

Comment
Add comment · Show 1 · 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
avatar image meat5000 ♦ · Mar 25, 2016 at 01:18 PM 1
Share

I cant recreate the error. I've tried a few things but all I managed to do is crash Unity :P

I made a cube and opened the Animation window and clicked create. It prompted me to save an anim file and a clip was also created. You cant remove the base layer of an anim file. But the crash occurred when I added Animation component, added the new clip and removed the Animator component.

Its just that the docs around AnimationClip are actually quite bizarre and they seem to fall over themselves.

AnimationClip : AnimationClip is used by Animation to play back animations.

Of course Animation is the Legacy animation component.

However, AnimationClip inherits from $$anonymous$$otion : Base class for AnimationClips and BlendTrees. $$anonymous$$otions are used by animation States in the $$anonymous$$ecanim State$$anonymous$$achines.

It seems to make some kind of sense but leads a lot of people to mix the two components. Im wondering if that is somehow the case here.

The only other way of thinking I had here was if perhaps the anim file had become corrupted or somehow altered like if you were duplicating and rena$$anonymous$$g files while the windows were open... you know that kind of typical windows-esque bug that happens when you attempt to do too many things at once.

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

6 People are following this question.

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

Related Questions

playing a different animation in an array 1 Answer

IndexOutOfRangeException: Array index is out of range. 0 Answers

What means this error ? 1 Answer

Array index is out of range error Edited 1 Answer

Enemy offset, gallaga style game (space invaders) 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