Animation event has no receiver in unity animation

In the process of editing animation by unity, this prompt always appears:

 

AnimationEvent ‘XXXXXX’ on animation ‘XXXXXX’ has no receiver! Are you missing a component?

 

 

After a long time, I changed the value, but it didn’t work

 

 

Hang the script of the method you want to execute on the object you want to execute the animation, and that’s it!

 

 

Yes, it’s that simple. But waste me a long time!!!

 

Read More: