Question by
wichilowat · Jan 29, 2016 at 11:59 AM ·
keypress
The name of my input button/key
how do you get the name of a input? For example when i press a jostick button or axis a string will be = to the input buttons name
Comment
Answer by OriginalsByToto · Jan 29, 2016 at 08:03 PM
Hello,
all the input names can be use like this :
if(Input.GetButton{state}("{button}")) {
//Action
}
Your answer
![](https://koobas.hobune.stream/wayback/20220612062131im_/https://answers.unity.com/themes/thub/images/avi.jpg)