daemon3000 / InputManager

Custom InputManager for Unity
Other
587 stars 88 forks source link

InputAdapter causes error after starting. #16

Closed TheSniperFan closed 8 years ago

TheSniperFan commented 8 years ago

When using the InputAdapter, you'll get the following error message after starting your game:

The input configuration named 'Desktop' is already being used by a player
UnityEngine.Debug:LogErrorFormat(String, Object[])
TeamUtility.IO.InputManager:SetInputConfiguration(String, PlayerID) (at Assets/InputManager/Source/Runtime/InputManager.cs:638)
TeamUtility.IO.InputAdapter:SetInputDevice(InputDevice) (at Assets/InputManager/Addons/InputAdapter/Runtime/InputAdapter.cs:597)
TeamUtility.IO.InputAdapter:Awake() (at Assets/InputManager/Addons/InputAdapter/Runtime/InputAdapter.cs:445)

(The name of obviously varies, depending on your project setup.)

As a workaround, you can configure your InputManager to use one of the joysticks by default. It's not a big issue, but I'm reporting it nonetheless. You shouldn't have to rely on such workarounds.

daemon3000 commented 8 years ago

Fixed. You'll no longer get an error if you try to assign an input configuration to the same PlayerID multiple times. It will simply have no effect. You'll get the error only if the input configuration is used by a different PlayerID.