- Home /
Question by
nandonandito69 · Jan 14, 2015 at 04:19 PM ·
c#inputjoystick
joystick connected
hi, i have some question about joystick connected when joystick was input like a picture. how can i make some code to check if joystick was input in my game? thanks.
2.png
(7.5 kB)
Comment
Answer by KurtGokhan · Jan 15, 2015 at 08:42 PM
You can use Input.GetJoystickNames(). It returns an array of names of joysticks connected. If the array is empty it means there is no joystick connected.
Your answer
![](https://koobas.hobune.stream/wayback/20220613180418im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Managing input from two players in the same computer using the Xbox 360 controller. 1 Answer
Speedlink Black Widow Flightstick 0 Answers
Apply Input.GetAxis Smoothing to Joystick Axis 0 Answers
Rotation of a object depending on where the joystick is facing 1 Answer
Multiple Cars not working 1 Answer