Double EventSystem Environnement Issues
Hi fellow devs,
I've been working for a few months on a project with a coop feature, and everything is working about the multiplayer but two things, that are linked so 1 big issue, and i spent days and days trying to fix it but it's still there.
The issue is that if I click anywhere on the screen when UI buttons are on, as i have 2 Event Systems in my scene to get the player inputs work separetely, both Event Systems in the scene lose focus on the current selected button they were on, whatever if none of the 2 players is using Keyboard and Mouse as inputs or not.
Also when a UI button get clicked with the mouse, if the button clicked has a OnClick() event or PointerClick event, it gets clicked twice. (Only 1 field in the InputManager is using "mouse 0", the same way any other buttons are used)
The way i'm trying to get this working is : If one of the two players is using Keyboard and Mouse as inputs, only 1 EventSystem is triggered when mouseClick, on buttons or anywhere and clicking anywhere does not affect the other player's event system current selection.
Any ideas to explore could save my project,
Thanks !
Answer by HeavyMix3 · Aug 09, 2018 at 02:22 PM
Solved the focus loss issue by coding a custom Input Module to replace the Standalone Input Module. Still working on the double OnClick event issue.
Your answer
Follow this Question
Related Questions
Detect which prefab triggers the button UI 1 Answer
Unity 5.2 - How can I keep other players from using a menu? 0 Answers
How can multiple users control a single UI canvas using InputSystem? 3 Answers
Is it possible to create separate controls for Input.GetAxis() for two players? 1 Answer
New Input System local multiplayer 2 Answers