Animation Questions clips, import etc

Questions about Animation.

  1. How would I get a list of the animations like
    animation[“walk”] from a gameObject.

2.When I import an FBX object it has one animation. I want to name the frame ranges for walk, run, stomp etc but should I do this with the FBX import or manually.

If I set up the animation states with fbxi import, then I cannot transfer the fbx to another unity project right?

If I do it through scripting how would I do it? I just want to say things like animation 1 = walk and is frames 10-35 etc…

Thanks,

Dan

Hi Dan,

Answers about Animation:

  1. See 2. - Some formats (like Cheetah3d for example) will allow you to retain the individual clips when you import the animations, but an .fbx tend to import as one long animation.

  2. See 3. - you can do it manually in Unity via the import settings, or as I prefer, by code.

  3. You can do it via scripting, like this:

animation.AddClip(animation.clip, "walk", 10, 35);

works great. Although the docs are quite confusing.

Thanks,

Dan