- Home /
Importing and playing animations
Hi! I want to animate my object in Blender. How can I import animations from Blender to Unity and how can I play it by script? There are no tutorials about animations on this page.
Comment
Answer by ado112 · Dec 23, 2013 at 02:24 PM
Try this script:
//animation play script
function Update () {
if(Input.GetKey(KeyCode.A)){ //when pressed a animation will start to play(when you press a,hold it)
animation.CrossFade("YourAnimationClipName"); //you need to set name of your animtion where i wrote YourAnimationClipName,and you need to set animation type to legacy in unity.
}
}
save your .blend file(from blender) directly in your assets folder
Your answer
Follow this Question
Related Questions
Character Importing Issue Blender 1 Answer
animations work but the object keeps going to the centre of the map 1 Answer
Importing animation from Blender using a lattice modifier. 1 Answer
Broken animation from blender import. 2 Answers
Blender animation on rigged character not the same in Unity... 2 Answers