Search Unity

Resolved UI controls stop working as soon as a player joins

Discussion in 'Input System' started by Bumpty, Aug 8, 2022.

  1. Bumpty

    Bumpty

    Joined:
    Jul 22, 2018
    Posts:
    33
    Hello, I'm making a local multiplayer game and I'm having a lot of troubles with the new input system.

    My goal was to have a global UI manager that would react to both Keyboard, mouse and controller. So anyone can navigate in the menu of our game. So I added a Multiplayer Event System and an Input System UI Input Module on a gameobject. This worked so far on the menu but as soon as I arrive in the character selection menu and a player press start to join the menu.

    I got it working by adding a Multiplayer Event System and an Input System UI Input Module for each PlayerInput prefab but these causes a lot of other bugs in the game later on. Sometimes there is 2 sursor selection at the same time, and also only one player can have control on the UI this way, mouse control often doesn't work anymore, and the player who has control seems kind of random...

    I know the way I'm doing things might not be the most optimal so I'm not looking to fix what I actually have but I'd like to know how should I handle this problem. Is it posible to have a global UI controls completely appart from the player gameplay controls?
     
  2. Bumpty

    Bumpty

    Joined:
    Jul 22, 2018
    Posts:
    33
    Adding a new type of input asset especially for UI fixed the issue and removing Multiplayer Event System and Input System UI Input Module from PlayerInput fixed it.

    Feel free to remove this post
     
    acasta likes this.