I have been working with NodeCanvas for a while now and really enjoying its flexibility; but I have hit a roadblock that I could use some help with. I am trying to create a custom action task to use in my behavior trees; but I am having trouble figuring out how to properly structure the code to make it work the way I want.
The action task I am aiming to create should make the AI character perform a specific animation and then wait for the animation to complete before moving on to the next node in the behavior tree. I understand how to trigger animations through Unity’s Animator component; but I am not sure how to handle the waiting part efficiently within the action task.
Set up a coroutine or other method to handle waiting for the animation to finish.
Ensure the action task properly returns success or failure based on the completion of the animation.