Animation State exported from FBX not recognized in Animation Behaviour

Hey guy!
I have the following scenario:

I got a .fbx file with an animation clip included. I exported this file by selecting the animation in the inspector and pressing cmd+d so i got the animation clip outside of the .fbx file. Then I added the animation clip in the Animation field and the Animations array of my Animation Behaviour:
1926224--124419--Bildschirmfoto 2015-01-19 um 10.23.15.png

The animation itself works pretty well. The Dopesheet has its keypoints an the animation also plays:

But when i do the following the counter stays at zero but GetClipCount says there is one clip:

nameState = new string[curAnim.GetClipCount()];
int c = 0;
foreach(AnimationState state in curAnim) {
nameState

 = state.name;
   c++;
 }

Has anyone an idea where there could be the problem?

I have found the solution:
The Animation Type of my AnimationClip was set to 2 but it has to be set to 1. The Animation Behaviour seems to be deprecated all imported AnimationClips are automatically set to 2.
To change it to 1 select the clip, rightclick on the Inspector Tab and choose Debug.
1927905--124527--Bildschirmfoto 2015-01-20 um 14.05.10.png

Now you can see the Animation Type variable.
1927905--124528--Bildschirmfoto 2015-01-20 um 14.05.15.png

1 Like