Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by aydin_khp · Jul 17, 2020 at 07:37 AM · uiinputmultiplayerplayerbug-perhaps

Second Player Cannot Navigate the Menu

Hi,

I am using the new input system in my game. In my main menu scene I have created a menu using UI buttons and player can navigate up and down in this menu and eventually select/press the button he wants. However, when the second player joins the game (by pressing a button on his controller) he cannot navigate the menu. I can see that the player joins successfully so that's not the problem. Also if I disable joining on Player Input Manager, the second player can also navigate the menu.

Based on what I have understood so far, I can tell that the Input System UI Input Module gets attached automatically to the first PlayerInput instance (created when the first player joins) and it won't receive inputs from the next instances of the PlayerInput. To me this is a weird behavior because it totally affects the logic of the UI and forces lots of scripting and hacking.

Example: Suppose I disable joining in the first menu. Then user moves to the next screen in which players should join to select their avatars which leads to a couple of PlayerInputs get created. Then if players decide to go back to the main menu, I have to destroy all the PlayerInputs to make the menu works normally. Destroying PlayerInputs in this scenario is not that complicated but suppose after choosing the avatars, players go to the next menu in which they want to choose the map of the level. In this menu, only the player attached to the first PlayerInput can choose the map; If I want to allow other players choose the map I have to write lots of scripts and do some hacks.

I really hope I am doing something wrong and there be a simple solution to this problem.

Regards,
Aydin

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by aydin_khp · Jul 24, 2020 at 09:07 PM

After a bit of more investigation I realized something: The InputSystemUIInputModule and the first PlayerInput (and probably any other component which their InputActionAsset field is assigned by the input system automatically) point to a same InputActionAsset instance. So basically my initial solution to clear the devices and bindingMask properties of the actionsAsset in InputSystemUIInputModule was not a good solution as it causes the PlayerInput acts weirdly. The solution I am using now is to create a new instance of the InputActionAsset and assign it to the InputSystemUIInputModule.

I believe there are a couple of issues involved in this problem:

  1. The documentation does not say anything about this behavior; I couldn't see anywhere in the documentation that says - for example : "As long as there are not PlayerInputs in the system the InputSystemUIInputModule listens to all the inputs from all the controllers but as soon as a PlayerInput gets instantiated the input module will only listen to device attached to that `PlayerInput."

  2. To me this behavior - even if it was documented - is a bit weird; Basically this behavior means that the UI can only get navigated by the first controller (not necessarily the first player) who joins the game. In other words if I created a single player game and start to navigate the menus with my gamepad but then change my mind and start using the keyboard as the main controller I won't be able to navigate the UI/menus. The same thing can happen in a multiplayer game as well.

    I will accept this comment as the answer in order to help anyone else who might face this problem but I think this can be considered as a bug too.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image helixquar · Mar 13, 2021 at 11:30 AM 0
Share

Have you made any progress with this? I have the same problem.

avatar image
0

Answer by aydin_khp · Jul 21, 2020 at 06:19 PM

I narrowed the problem a little bit; I can see the devices and bindingMask properties of the actionsAsset property of InputSystemUIInputModule point to only one of the controllers. When I set both of these properties to null the input module responses to all the controllers.

So the question here is: Who set the devices and bindingMask properties of actionsAsset and why? Is this a bug?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

331 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Detect which local player clicked a button 0 Answers

button.Select() and alternatives don't seem to work when called via new input system 1 Answer

File Input 1 Answer

Cinemachine Input Provider requires InputActionReference. Any workarounds? 0 Answers

Multiplayer server controls all players 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges