Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

New Input System - Local Multiplayer Setup

Discussion in 'Input System' started by itsnotandreea_, Apr 9, 2020.

  1. itsnotandreea_

    itsnotandreea_

    Joined:
    Apr 19, 2019
    Posts:
    2
    I decided to use the new Input System (v1.0.0). My game is a local multiplayer (2 players), but the 2 players have completely different abilities (e.g. player 1 can run, player 2 can't). The input comes from two gamepads. I made two Action Maps, and attached a Player Input component to both players, then selected the Actions object for both and then the specific Default Map for each player (PlayerOne Action Map to Player 1, PlayerTwo Action Map to Player 2). What happens when I play the game is both players can do what only player 1 should be able to, and none of the players can do what player 2 should be able to do. I don't know how to assign each gamepad to the players (gamepad 1 to player 1, gamepad 2 to player 2), or how to separate the two. I'm a bit confused about the whole thing and there's not much information on multiplayer setup for the new system online, and I also can't use a prefab player.. Does anyone know how to even get started?
     
  2. oscar265

    oscar265

    Joined:
    Mar 25, 2020
    Posts:
    2
    I have the same question. Did you ever got a solution? Any idea?
     
  3. itsnotandreea_

    itsnotandreea_

    Joined:
    Apr 19, 2019
    Posts:
    2
    I used a workaround found in a tutorial on Youtube: Local Co-op in Unity using the New Input System - Tutorial, from Broken Knights Games. I hope it helps!
     
  4. wrabenstein

    wrabenstein

    Joined:
    Oct 29, 2020
    Posts:
    5
    This should easily be fixed by using a PlayerInputManager (push button to join player)