Hi! I’m using the new Input System to setup a local co-op multiplayer game, but I’m having an issue that seems to be a bug.
Whenever a player is joined, it is automatically kicked out (ie. onPlayerLeft is called)
To find this I created a simple class that logs the OnPlayerJoined and OnPlayerLeft events. This is the output:

While debugging I figure out it is because “playerInput.hasMissingRequiredDevices” is true, which is causing the player to be destroyed:
My Schemas are the following:


This is the player input:
And the player manager looks like this:
So I don’t see any problem regarding setup. Yet the issue happens on all cases (either joining a gamepad player, or a keyboard&mouse player using mouse or keyboard). It doesn’t make sense as I am logging the device when they join, and we can see it is there.
I tried making the devices optional, but it causes the system to spawn a new player everytime I press a key, regardless if there was one before.
I also tried setting the “default schema” to keyboard&mouse on the PlayerInput, which allowed me to join a player that was working as expected using that schema. Yet I was not able to join the gamepad player due to the same issue mentioned before.
May I be missing something? Is there any possible solution?
Unity: 6000.0.32f1
Input System: 1.11.2
Update
Everytime a new player is created, the actions in the Input Debug view increase, and they never go down again. In the following picture we can see 209 actions…
Weirdly enough, this also happens in the multiplayer sample scene, but only when using my own Player prefab (so it works correctly with the sample prefab).
The weird part is that I only have the PlayerInput enabled in my Player prefab (I disabled everything else), and I configured it in the exact same way as the Player in the Multiplayer Sample. Yet the issue still persist.
In addition to that, I’m receiving this error message after some time:
The GameInputActions.cs file is autogenerated from my own input actions. However, I have setup the Multiplayer Sample actions in the project settings and also in my player prefab, so it doesn’t make sense to get that message.
As a side note, the multiplayer sample works well using its Player prefab even when using my custom actions. Only fails when using my prefab (which looks the same).
Update 2:
After trial and error I figured out what is the issue. It turns out to be that I was doing this, right in the “awake” method:
This is supposed to allow to setup the player controller in a compile-safe way, by implementing an autogenerated interface that contains one method for each action and using the “invoke C# events” behavior in the PlayerInput component. However, it turns out that this is
incompatible with local multiplayer, and was only working correctly in a single player session (without using the InputManager).
Removing it fixed the connection issue. And as so I ended up using the “Invoke Unity Events” behavior mode in the PlayerInput, as the others were throwing exceptions of “method not found” in my other components which has nothing to do with the input.
so I hope it helps someone. This was a very annoying experience, as the “invoke C# methods” behavior is not documented at all besides the little description in the Unity Input System. My bad for trying to use it, but it really needs more docs.
I have the feeling about reading something about this in the past, but couldn’t find it again.
1 Like
Was able to reproduce the issue on my project as well.
It seems that when you change the InputActionAsset of a PlayerInput compoenent at runtime, Unity destroy the gameobject complettelly and don’t log any message. So it looks like the player was kicked out (the events for Player Left are Invoked).
Resulting in the player being kicked as soon as they join, without error log.
1 Like