I'm working on an AI implementation in Unity, using the Fluid Behaviour Tree library and I was wondering how to handle the animations with the BT.
I'm building a character that can interact with the player, so when the player hits a specific key it should stop doing whatever it's doing and react by playing a proper animation. The animations are set up in an Animation Controller. The problem is I can't find a way how to detect if an animation is finished in order to continue with the rest of the tree. I've read that animations and BT's should be separated but I can't really imagine how to do that.
So here's my question: how should animations be handled by a behaviour tree that's set up in Unity? How can I provide the proper execution of the BT and perform the animations in their full length when needed?