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.

Question Name Error When using animation in unity

Discussion in 'Animation' started by cozmo17, Jan 12, 2023.

  1. cozmo17

    cozmo17

    Joined:
    May 27, 2022
    Posts:
    3
    I was Following a Tutorial when i got an error saying that i had not used the correct name in the perameters tab but the two were the same

    Further info will be in the images

    my code reduced to error

    animator.SetFloat("rename", Mathf.Abs(horizontalMove));



    upload_2023-1-12_17-25-48.png

    Thank you
     
  2. jn97342

    jn97342

    Joined:
    Jan 4, 2023
    Posts:
    41
    You set “rename” as a Parameter. You are currently in the Parameter Tab. Look next to the Parameter tab, there is a Layer tab. Click that, and create a layer named “rename” and set it to a float.
     
  3. cozmo17

    cozmo17

    Joined:
    May 27, 2022
    Posts:
    3
  4. cozmo17

    cozmo17

    Joined:
    May 27, 2022
    Posts:
    3
    Never mind I Got it working thank you for your time
     
  5. jn97342

    jn97342

    Joined:
    Jan 4, 2023
    Posts:
    41
    Glad you got it to work! Let me know if you have any other questions.