Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question How to switch which InputUser a PlayerInput uses?

Discussion in 'Input System' started by teevik, Sep 16, 2020.

  1. teevik

    teevik

    Joined:
    Sep 3, 2019
    Posts:
    3
    Hey, is it possible to switch which InputUser a PlayerInput uses?
    For now I've done a workaround by using
    playerInput.SwitchCurrentControlScheme
    which works ok when the PlayerInput has a InputUser, but errors if the InputUser is invalid (which happens if i have two characters but only one controller)

    The end result i want is to be able to have both single player and two players, and let the players switch which in-game character they are controlling