Skip to content

Player Input assigns the same gamepad to different game objects #987

@Dogmeat-Keush

Description

@Dogmeat-Keush
  1. Connect 2 xbox controllers.
  2. Install new input system preview.3 1.0.0 on Unity 2019.2.17f1
  3. Restart Unity
  4. Go to Edit > Project settings > Player > Other settings > Active Input Handling > Input System (preview)
  5. Restart Unity
  6. Create Input Actions (it can be very simple such as moving the stick or the trigger, or use the one in the Tanks Demo as an example)
  7. Add a cube to the hierarchy and add "Player Input" component to it.
  8. Setup as in attached screenshot.
  9. Setup a script to receive the call backs from the Actions and log something to the console.
  10. Create a sphere and do steps 7, 8 and 9.
  11. You can also just duplicate the cube. The issue is the same.
  12. Select game objects and look at the inspector, they will state the paired device is the same.
  13. Both gamepads will send to the same object.
  14. You can also look at the Input Debug

image

I've also tried making prefabs out of the cubes and have a script instantiate the prefabs, but still the Player Input assigns the same gamepad.

image

image

What I don't get is why the example for the Tanks demo found here: https://github.com/Unity-Technologies/InputSystem/releases/download/1.0.0.0/TanksDemo-1.0.0.0.unitypackage works properly and assigns a different gamepad to each player every time.

Am I missing anything?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions