AnimationEvent 'functionName' has no receiver! Are you missing a component?

Hi guys. i have got a problem when i 'm creating the mecanim animation. the error information is :
AnimationEvent has no receiver! Are you missing a component?
but i have already add the event script and attach this script to the target object and the function name is existed really.The object is created dynamiclly .
Sometimes i may got this problem but othertimes it can work normally. Did i do something wrong?
I’m from china, my English is not very good. please understand.
Many thanks.

Did you ever find a solution to this issue? I have the exact same problem with a dynamically created object.

So after a lot of headache, I found out how to solve this. Apparently you can attach an event handler to an animation clip. Also keep in mind that some of the clips are read-only. If this is the case, you simply need to attach a script to the object you are animating.

void <name_of_handler>() {
  // do something or do nothing
}

If it is not read-only, bring up the animation window, and delete the animation event (the REALLY tiny little tab mark)

3259755--251304--upload_2017-10-19_19-24-29.png

3 Likes

It’s a lot of time passed, but I am so grateful to you, thank you so much! :slight_smile:

While we’re necroing, here is some additional AnimationEvent-related information:

Necroing just in case anyone runs into the problem I was having - same error, I had hooked everything up correctly but still got the ‘no receiver’ error. Turns out I had accidentally created 2 animation events in my animation clip, at the same exact spot on the timeline, and one was hidden behind the other. I only realized this when I dragged one of the events to a different timestamp, and saw that another was behind it. What I should have realized is the error was for AnimationEvent “NewEvent”, meaning there was an event that I hadn’t changed the function name of.