How to enable and disable joining with the new input system
How to enable and disable joining with the new input system via script b/c I don't want players to join mid-game but in the menu, I've heard of methods like "public void DisableJoining()" and "public void EnableJoining()" but I have no idea how to use them.
Answer by linusfackler · Mar 19 at 09:18 AM
Reference the PlayerInputManager in the script first, for example:
public PlayerInputManager playerManager; ... if (playerManager.playerCount == 2) { playerManager.DisableJoining(); } In this case, if 2 players joined, joining is disabled.
Your answer
![](https://koobas.hobune.stream/wayback/20220613034054im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Rebind - Excluding Certain Keys 0 Answers
New input system bind meta quest 2 controller 0 Answers
Input System Button Triggers Multiple Times 2 Answers
Tanks tutorial 'Input' issue 0 Answers
New Input System not registering all move events for gamepad 0 Answers