- Home /
newbie: how to setup an input?
I think I've really missed something about it. I'm going to edit --> Project settings --> input
and I can't find anything interactive there, what exactly should I do to make "space" (for instance) an input for my game?
edit: really sorry for misleading, I meant project setting and no render settings
Answer by EvilSquid · Aug 18, 2013 at 10:33 AM
Hi,
The Input manager is found in edit -> Project Settings -> Input. The reason you can't find it is because you are looking in the wrong settings!
From there you can delete each input you don't want (called Axis) or change certain settings to fit your game. Changing the number of Axis will change the amount of inputs, therefore adding Axis will add new inputs.
For example, if you want to make the Space Bar an action button, you could find the Axes named "Jump" and rename it to something such as "Action" or "Interact".
You can get a better explanation than I can give you here.
Simply increase the number of Axis by 1, and it will create a new Axis. Axes is basically just the fancy word for button. From there you can rename it to something like "Action" and assign the key.
To assign the Space bar, scroll down to the label "Positive Button". In the text box for "Postive Button", simply type in "space" without the quotation marks. Then, when you want to add it into your script, you will use
if(Input.GetButton("Action"))
Do something;
You can change the GetButton to GetButtonDown or GetButtonUp, depending on what you want. I hope this helped :)
Answer by legion_44 · Aug 18, 2013 at 10:35 AM
You have to go to Edit -> PROJECT SETTINGS -> Input. As in screenshoot:
Your answer
Follow this Question
Related Questions
Animation Input / ETC 1 Answer
Add Force At Player 0 Answers
new input system catches inputs too early 1 Answer
Camera movement using touch input 0 Answers
When should I use prefabs? 2 Answers