Help please. My animation exported from maya 2009 as fbx (with all keys baked in the fbx setting) is not looping in unity iphone. However it loops correctly in unity 2.6. Any ideas? Thanks in advance.
Ok now I understand. Unity iphone handles animation differently from 2.6. So I fixed it by setting the wrap mode to loop in the inspector. However this applies to all the animations in that character. How do I set it so certain animations have a different wrap mode (play it once instead of it looping)?
The way I set my animation is using the @ method. ie. character@animation1, character@animation2 etc.
animation[“AnimationClipName”].wrapMode = WrapMode.Loop
this is effectively accessing an animation clip’s “AnimationState”
you can also access them as “this”
for(a : AnimationState in animation){
a.wrapMode = WrapMode.Loop;
a.speed = 0.3;
}
so on. look up the AnimationState class for more useful stuff you can do w/ it.
Also another note from Unity2.x → 1.x
AnimationEvents in Unity2.x are not supported as liberally. If you setup an AnimationEvent function in U2.x then when it is imported back into 1.x it wont know what to do if you are passing data back unless the animation event callback is only receiving a single parameter of the AnimationEvent class rather than arbitrary data.
Thanks for the tips. I will look into it.