Input manager - define ''R'' button

Hello!

I want to animate my model in the game when i press the W or R button.
When i start the game, it says: ‘‘Input Button r is not setup.’’
I want to define a new button in Input Manager, but i don’t know how.

I made this: but doesn’t work. I read and watched tutorials and instructions, but i don’t understand.

8897-unity.png

Thank you!

I have a very basic script:

if(Input.GetButtonDown("r"))
 {
   animation.Play("AnimationAction_001");
  }

( This is not the whole script )

Currently the positive button (the input for this action) is “joystick button 3” you will need to change this and also for good practice, give your input a better name to refer to.

In order to fix this you will need to change the following:

  • Name: PlayAnimation
  • Positive Button: r
  • Alt Positive Button: w

Your Script will need to then display:

if(Input.GetButtonDown("PlayAnimation"))
 {
   animation.Play("AnimationAction_001");
  }