Blender FBX animation

Hi, I have imported a FBX asset created by Blender but how to script the animation? Since it included 2 action ( waking and fall down/dead) is anyone have any idea on looping walk script and dead script?

Thank you!!

In the FBX importer from the Inspector, you can set the animation to loop from there under “Animation Wrap Mode.” If you FBX model has all the animations inside of one FBX, then you will have to separate the frames in the lower Box that gives you the ability to do so ( titles: name, start, end, wrapmode, loop ). You can separate them by pressing on the ‘+’ sign in that box, and then designating the start and end frames. I would suggest making a naming convention that is unique to that particular model and animation, like ’ thisAnimation_Walk’, ‘thisAnimation_FallDownDead.’

Another way would be to export the model from blender without animations attached to them, and export each animation with the FBX model separately so you can use the @ naming convention. So for this instance, you would have “thisModel.fbx”, “thisModel@Walking.fbx”, and “thisModel@FallDownDead.fbx.”

To access these animations from script, you would simply put

animation.Play( "Walk" );

If you wanted to set the wrap mode inside of the script, you would put:

animation[ "Walk" ].wrapMode = WrapMode.Loop;
animation.Play( "Walk" );