I'm trying to catch an animation event that I have created but its not working.
I have added my own script to an item and the debug log works.
The Animator Monitor script handles all the animation events? that comes from function ExecuteEvent and Execute the event in the string field?
I have added my own script to an item and the debug log works.
C#:
private void OnEnable()
{
Debug.Log("START EVENT!");
EventHandler.RegisterEvent<ItemAbility, bool>(gameObject, "OnAnimatorItemUse", OnAnimatorItemUse);
}
private void OnDisable()
{
Debug.Log("END EVENT!");
EventHandler.UnregisterEvent<ItemAbility, bool>(gameObject, "OnAnimatorItemUse", OnAnimatorItemUse);
}
private void OnAnimatorItemUse(ItemAbility itemAbility, bool activated)
{
Debug.Log(itemAbility + " activated: " + activated);
}
The Animator Monitor script handles all the animation events? that comes from function ExecuteEvent and Execute the event in the string field?