Search Unity

Question Local multiplayer spawning different characters

Discussion in 'Input System' started by VascoCorreia, Mar 20, 2023.

  1. VascoCorreia

    VascoCorreia

    Joined:
    Dec 5, 2020
    Posts:
    23
    Hello everyone, please bare with me since I am trying to migrate to the new input system and am having quite a bit of trouble with local multiplayer.

    I have 2 characters with different behaviors one for each player. I tried going the C# generated class but I am not being able to pair a certain gamepad to a certain player, the documentation is not very good. Any help here?

    It seems much easier to go the PlayerInput + PlayerInputManager route, but every resource I find seems to instantiate the same prefab of a character as many times as necessary. In my case, they would need to be different characters.

    I also do not want to spawn players when clicking a button but instead as soon as a scene is loaded. (something like portal 2).
    Is the "Spawn Players Manually" value of the "Join Behavior" Enum the correct route for this, or is there some other better way?

    I am sorry if this is quite a common question here, but I just did not find any good direction on the topic.
    Thank you!
     
  2. VascoCorreia

    VascoCorreia

    Joined:
    Dec 5, 2020
    Posts:
    23
    Any suggestions? Would be greatly appreciated!