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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Use correct control scheme on join

Discussion in 'Input System' started by SamJ, Oct 10, 2020.

  1. SamJ

    SamJ

    Joined:
    Dec 28, 2012
    Posts:
    2
    Hello, I think I am missing something in my co op game but I cannot find the answer anywhere.

    I have a co op game where the players can play on keyboard or gamepad. I am using the PlayerInputManager to let players join, when player 1 joins using the keyboard he can move around fine, when player 2 joins using the gamepad he cannot move and his character is controlled by the player 1's keyboard who is now moving both characters.

    The same thing happens if player 1 joins with the gamepad and player 2 joins with the keyboard except now both characters are controlled by the gamepad.

    I have 2 control schemes, 1 for keyboard and 1 for gamepad and the action map looks like this:

    upload_2020-10-10_14-22-54.png

    When the player joins the Default Scheme is not set in the Player Input, but even if I set one to my keyboard scheme and one to my gamepad scheme the problem is not fixed.

    Any help would be appreciated.
     
  2. SamJ

    SamJ

    Joined:
    Dec 28, 2012
    Posts:
    2
    After looking at the sample project "Simple Multiplayer" I figure out what I was doing wrong.

    I had everything configured correctly but my scripts were referring to the same playerInput asset instead of the one that is created by the PlayerInputManager. Silly mistake and I knew something was wrong at the time because I wrote a comment "// I'm worried this may one day fail"
     
  3. wokazedpill

    wokazedpill

    Joined:
    Oct 10, 2020
    Posts:
    1
    Use of Silditop 25mg Tablet is used to treat impotence in men which is manufactured by Healing Pharma India Pvt. Ltd. Impotence is one of the s*xual disorder in which men are unable to maintain or achieve erection during s*xual intercourse. Sildenafil citrate is the main component of this medicine which is a phosphodiesterase type5 (PDE-5) inhibitor.Order Now At Online medicine store wokaz.com. Fast delivery in USA, UK, Canada Available. Buy online Silditop Now.