Register to animator use event

snicker

Member
I want to register for events OnAnimatorItemUse and OnAnimatorItemUseComplete, but I am getting this error when the animation plays and its not receiving the event.

"AnimationEvent 'ExecuteEvent' on animation 'RightHand@Attack04' has no receiver! Are you missing a component?"

I have this script on the same object as animator sending the events

public void Awake()
{
EventHandler.RegisterEvent(gameObject, "OnAnimatorItemUse", OnItemUse);
EventHandler.RegisterEvent(gameObject, "OnAnimatorItemUseComplete", OnItemUseComplete);
}
 
Animator events are independent of our event system and it looks like that error is coming from Unity's Animator. ExecuteEvent is a method on the AnimatorMonitor/ChildAnimatorMonitor and based off of that error you don't have that component on the item that is playing the animation. Using the Item Builder it will automatically add the correct components if you have built it with an animator.
 
Top