#Mirror x Unity New Input System - Gamepad issues with 2 instances on 1 device

8 messages · Page 1 of 1 (latest)

main edge
#

Hello there,

I am using the Unity New Input System, and I am facing an issue using an Xbox Gamepad.
I am running 2 instances of my game on my laptop.

If I use my keyboard to move, only the player in the focused window is moving (correct behaviour) ;
If i use my Xbox Gamepad to move, the players in both windows are moving (wrong behaviour) ;

It looks like my gamepad inputs are sent to both instances when you are using a gamepad, but not a keyboard.

Do you have any secret recipe to solve this problem ?

(Topic can be found here without solution : https://github.com/vis2k/Mirror/issues/2254)

GitHub

#1 Open Source Unity Networking Library. Contribute to vis2k/Mirror development by creating an account on GitHub.

scenic jolt
#

This is not a mirror problem

#

But a unity problem

#

You can use Application isFocused, in your Update input code

#

One reason why i still use old input system 😎 unity rarely makes things better, it just changes them

main edge
#

@scenic jolt I tried your solution, and it perfectly works.

scenic jolt
#

(Helps others with same problem)