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. Dismiss Notice

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

Discussion in 'Editor & General Support' started by YanXiang, Apr 18, 2014.

  1. YanXiang

    YanXiang

    Joined:
    Apr 18, 2014
    Posts:
    1
    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.
     
  2. Kev00

    Kev00

    Joined:
    Dec 6, 2016
    Posts:
    229
    Did you ever find a solution to this issue? I have the exact same problem with a dynamically created object.
     
  3. DarkGate

    DarkGate

    Joined:
    Jan 26, 2016
    Posts:
    33
    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.

    Code (CSharp):
    1.  
    2. void <name_of_handler>() {
    3.   // do something or do nothing
    4. }
    5.  
    If it is not read-only, bring up the animation window, and delete the animation event (the REALLY tiny little tab mark)

    upload_2017-10-19_19-24-29.png
     
    vfirstof, CreamyBlood and YawJatah like this.
  4. vfirstof

    vfirstof

    Joined:
    Mar 25, 2021
    Posts:
    1
    It's a lot of time passed, but I am so grateful to you, thank you so much! :)
     
  5. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,487