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. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

new event has no reciever?

Discussion in 'Animation' started by chasemcpherson, Feb 8, 2015.

  1. chasemcpherson

    chasemcpherson

    Joined:
    Sep 4, 2014
    Posts:
    17
    'Human_1T' AnimationEvent 'NewEvent' has no receiver! Are you missing a component?
    every time i press "Fire3" which i have left shift set as the input, the game quits and i get the error above
    Code (JavaScript):
    1. #pragma strict
    2.  
    3. var playerAnim : Animator;
    4. var v : float;
    5. var h : float;
    6. var sprint : float;
    7.  
    8. function Start () {
    9. playerAnim = GetComponent(Animator);
    10.  
    11. }
    12.  
    13. function Update () {
    14. v = Input.GetAxis("Vertical");
    15. h = Input.GetAxis("Horizontal");
    16. Sprinting();
    17. }
    18.  
    19. function FixedUpdate()
    20. {
    21. playerAnim.SetFloat("Walk", v);
    22. playerAnim.SetFloat("Turn", h);
    23. playerAnim.SetFloat("Sprint", sprint);
    24. }
    25.  
    26. function Sprinting ()
    27. {
    28. if(Input.GetButtonDown("Fire3")){
    29. sprint = 0.2;
    30. }
    31. else {
    32. sprint = 0.0;
    33. }
    34. }
    35.