- Home /
How to switch controllers using PlayerInput,Switching paired devices using PlayerInput
I am building a very simple fighting game and want players to be able to choose and switch what device they are using to play with. Using this line of code: PlayerInput.Instantiate(prefab, 0, null, -1, controllerDevice); I instantiate a prefab which is paired to the device "ControllerDevice" and everything works. But I want my players to be able to switch what device they are using and I couldn't find anyway to do this without re-instantiating the prefab. How can I switch what device PlayerInput is currently using?,I am building a very simple fighting game and want players to be able to choose what device they are using. When using PlayerInput.Instantiate(prefab, 0, null, -1, controllerDevice); I specify what device that player will be paired with and everything works. But I cannot find how to change this to a new device without performing a re-instantiation. How can I set what device PlayerInput is currently using?
Your answer
![](https://koobas.hobune.stream/wayback/20220613023627im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Detecting Controllers 0 Answers
InputManager, Gamepads, Wheels: remapping and calibrating 1 Answer
Game doesn't recognize X-axis input from XBox 360 controller 1 Answer
Unity3D and Android Controller Support 1 Answer
[XBOX][CONTROLLER][INPUT] Xbox controller "Console/Guide" button not mapped in unity 1 Answer