Search Unity

How do I maintain control shcmes between scenes?

Discussion in 'Input System' started by WizByteGames, Oct 18, 2019.

  1. WizByteGames

    WizByteGames

    Joined:
    Mar 28, 2013
    Posts:
    70
    I'm trying to make it so that I have what ever control scheme I was using when on one scene carry over to another scene. So if I'm on the Title Screen and I transition to a gameplay scene the control scheme doesn't revert back to the default control scheme.

    I thought setting the control scheme at the beginning when start was called that would work but it doesn't. The control scheme is still set to keyboard and mouse even though I'm using a gamepad.
     
  2. WizByteGames

    WizByteGames

    Joined:
    Mar 28, 2013
    Posts:
    70
    So I figured I would just use one persistent playerInput instead of having one per scene. But now I have this issue where the UI Input Module gets messed up when I return to a scene.

    So basically this happens.
    1. Start the game from Scene A.
    2. Set the PlayerInput up to use the UI Input Module.
    3. Everything is fine
    4. Move to Scene B
    5. Set the PlayerInput up to use Input Module for Scene B
    6. Everything is fine
    7. Move back to Scene A.
    8. Set the Player Input to Use Input Module for Scene A
    9. Now you can't use a different control scheme