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

Two PlayerInputs Won't work

Discussion in 'Input System' started by taobingxue, Sep 6, 2022.

  1. taobingxue

    taobingxue

    Joined:
    Sep 4, 2015
    Posts:
    2
    It is my first time using th is new InputSystem. >.<

    I created an InputActuion with two schemes.
    Now if I attach a PlayerInput (on UI) to one of my GameObject with scheme1/auto-switch uncheck/send message, my OnMove is triggered as expected.
    Then if I attach a second PlayerInput to a different GameObject with scheme2/auto-switch uncheck/send message, then non of the game obejcts would ever receive OnMove. It is gona work with defined button if I remove any of them.

    I am so confused.
    The two scheme are both keyboard, just jump with 'space' and jump with 'up arrow' for two different gameobjects.

    Can anyone help!
     
  2. taobingxue

    taobingxue

    Joined:
    Sep 4, 2015
    Posts:
    2
    I tried to only attach PlayerInput for one gameobject and initiate the second one, then only the initiated one won't work. @.@