- Home /
The question is answered, right answer was accepted
Input button is not setup??
every time I click play an error appears down that says: Input button crouch is not setup
and then I go to edit->project settings->Input and there is no crouch listed in it.
So how can I add crouch button to input manager?
Thanks
go to edit->project setting->input and the set key which ever you have used in the code
if (Input.GetButtonDown ("Crouch")){ if(crouching){ stopCrouching = true; normalSpeed(); return;
Answer by e-bonneville · Mar 17, 2011 at 02:30 PM
If you want to add another input button in the Input manager, follow these steps:
- There should be a number that says "17". Increase that to 18.
- At the bottom of the Input manager, an 18th button will have appeared named "Jump".
- There will now be two "Jump" entries. Open the second one.
- Set Name to "crouch".
- Set Positive button: "shift". (Or whatever button you want. List of possible buttons here).
- That's it! Your script should work now. If it still doesn't, make sure the name in the Input manager is the same as the name you entered in your script.
when i try and change the positive button, it changes back to what it was....plz help
You probably spelled something wrong or you didn't press the Enter key after typing :)
Answer by robertmathew · Mar 17, 2011 at 02:05 PM
if (Input.GetButtonDown("Fire1")) {
//do something
}
press left clt button for fire1 the positive control button is left clt go to edit->project setting->input to see list of virtual button and there settings
Follow this Question
Related Questions
Input manager cross platform 2 Answers
WebGL and I/O 1 Answer
Having problems with inputs. 1 Answer
Problem with Custom Input Manager 1 Answer
Input Issue 1 Answer