Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

"Failed to call AnimationEvent" when its clearly there.

Discussion in 'Animation' started by Sersh, May 23, 2022.

  1. Sersh

    Sersh

    Joined:
    Oct 25, 2015
    Posts:
    23
    First time using AnimationEvent and I get this error every time the animation is played:

    upload_2022-5-23_12-54-0.png

    When the class definitelly has that event:

    upload_2022-5-23_12-54-27.png

    Also I'm confused, why it only throws this error for the "class Monster" - the prefab with the animation has many components:

    upload_2022-5-23_12-55-24.png

    One of the components also has a "Hit" function which gets called normally:

    upload_2022-5-23_12-56-1.png

    Kinda confused why I get this error and why the function is not called.

    edit: found the issue, the class hat another "Hit(..)" already with parameters. Apparently I cannot delete this thread
     
  2. pvdhouten1970

    pvdhouten1970

    Joined:
    Oct 3, 2015
    Posts:
    1
    Hi,

    I had a very similar issue:
    This confusing behavior can also occur when another class attached to the object has a function with the same name and with parameters.