- Home /
Animation Loop Locked
Hi guys,i'm working on a project. I imported iClone character and animation and all works great,but i need the animation Loop. In the inspector,the Wrap.Mode is locked,how i can add a script that can Loop my animation? This is my script:
for (var state : AnimationState in animation) {
animation.wrapMode = WrapMode.Loop;
}
When i add this on the character there is an error that say "The name script does not match with the var definied in the script" Can you help me? Thanks
PS:I'm working with android
Answer by TomPendergrass · Jan 07, 2013 at 04:17 PM
Hello crilose. I do a lot of character animation for the game I'm working on right now (arxcatalyst.weebly.com), and I've come across your problem in the past. The reason the animation wrap mode is locked in the inspector is because the animation you're trying to change comes directly from the imported file. It's in a sort of read only status, so you don't lose your data if you ever reimport the animation. Not to worry, there's an easy fix. All you have to do is duplicate the animation you want to modify. (I believe copy / paste works just fine). Now you'll have a copy of the animation free of any previous data, that you can easily modify!
Good Luck ;)
Thanks a lot! I've been pulling my hair on this one... and now i feel so stupid knowing the solution is that simple ahahahaha
Your answer
![](https://koobas.hobune.stream/wayback/20220613090539im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Play either the first or second animation on an object without specifying its name 1 Answer
Networked Animation Playing Wrong 1 Answer
Walking and Running Script not working. 1 Answer
MissingMethodException error while trying to play animation when GameObject is destroyed 0 Answers
animation.play is not working (did the legacy thing) 0 Answers