Search Unity

New Input system, Multiplayer - How to stop assigning a new control scheme

Discussion in 'Input System' started by MrGreenish, Nov 11, 2021.

  1. MrGreenish

    MrGreenish

    Joined:
    Oct 20, 2019
    Posts:
    34
    I'm using the new input system for a multiplayer game. The first player to be instantiated on the server gets the correct (default) control scheme. The second player to join gets another control scheme assigned automatically. They both need to use the default control scheme.

    This problem may or may not be isolated to when running multiple builds on the same machine but I need this to work for testing.

    How do I disable this behavior? If there is a way to assign a control scheme through C# code after instantiating I'm happy with that solution as well as long as all players can be assigned the same control scheme.

    Cheers
    Olof

    Screenshot (136).png Screenshot (135).png
     
  2. Why do you even have an active PlayerInput on a non-local player? It doesn't seem to make sense to me, you don't expect player input on players aren't local, do you?
     
    MrGreenish likes this.
  3. MrGreenish

    MrGreenish

    Joined:
    Oct 20, 2019
    Posts:
    34
    Yeah, that's it. True, it doesn't make any sense to leave to the Player Input on for non local players. It simply didn't cross my mind that it could be the issue. Thanks!
     
    Lurking-Ninja likes this.