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

Check which button pressed from OnPlayerJoined message when player joins with Player Input Manger?

Discussion in 'Input System' started by albrechtjess, Apr 17, 2020.

  1. albrechtjess

    albrechtjess

    Joined:
    Oct 11, 2017
    Posts:
    11
    So wanted to change the controls based on what button is pressed to join the game using the new Player Input Manager. I'm passed a Player Input when OnPlayerJoined is sent(Send Message) by the Player Input Manager so I imagine there's a way with that. Is there a way to see what button was pressed when the device was assigned to the Player Input in the Player Input Manager?
     
  2. albrechtjess

    albrechtjess

    Joined:
    Oct 11, 2017
    Posts:
    11
    I ended up just putting some code in my controller script to pause the player and look for the button that is pressed there, thus when any button is pressed the player is assigned by the input manager and then I can check which button is pressed next in the controller for assigning the controls.