Search Unity

StateMachineBehaviour & Blend Trees

Discussion in 'Animation' started by jimmay, Apr 22, 2015.

  1. jimmay

    jimmay

    Joined:
    Sep 23, 2010
    Posts:
    28
    One of the touted benefits of the new StateMachineBehaviours is adding a sound hook to an animation state. That sounds great! Unfortunately, I'm not sure how I could do this when a blend tree is involved. I can put a script at the top level of the state containing the blend tree, but how would I go about getting more information so I can figure out what sound to play? Does it even make sense here?

    Basically I have a blend between an idle animation and a walk. I'd like to start playing an idle sound when the idle animation starts playing and then crossfade the sound over to a walk as the animation blends over to walk.

    Doable?
     
    Eater_Games likes this.