Question about animation transitioning


I am very, very new to unity. A friend and I are working on a game for fun, and I am in charge of character animation. I have made a simple three ‘sequence’ animation for a sword swing, and have been having trouble implementing the way I want it to.

It essentially works in three parts, the swing, the slice, and the crash. The game has each as something, like say a ‘three hit combo’. So the user will press the mouse button three times to initiate all three and complete it. As well, they should be able to cancel after any swing, to go right back to the idle animation.

However, I can not for the life of me figure out how to make this work. No matter what I seem to try, it will do all three attacks no matter what, and I cant seem to find how to add in the cancelling at certain keyframes.

So my question is as followed: Would I need to make the animation and cut it down to three different ones, each with two different version to where one cuts back to the idle pose, and the other to the next ‘scene’ of the attack, or is there a way to use unity to cancel the animation at the specific keyframe so that it will then go back to the idle animation.

If anyone is able to give me some information or point me in the right direction for this, I would very much appreciate it!

It’s probably easier to make three animations/Actions in Blender. Make a fake user for each of the actions, export as an FBX file. THEN You’ll want to look at this. Unless you know C# really well and have come from another lower level or less “Rapid Prototype” style engine, or in other words if you are a total newb, you’ll probably want to learn how to use the State Machine workflow with the Animator Component. Probably can’t explain it easier but I might be able help hash it out with you over time unless someone else has a better way to help.