Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting Number of Players to more than one with only one input device throws an error #3

Open
bradweiers opened this issue Mar 10, 2020 · 2 comments
Assignees

Comments

@bradweiers
Copy link

The following error is thrown per extra player.

ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index
UnityEngine.InputSystem.Utilities.ReadOnlyArray`1[TValue].get_Item (System.Int32 index) (at Library/PackageCache/com.unity.inputsystem@1.0.0-preview.5/InputSystem/Utilities/ReadOnlyArray.cs:117)
UIMenuManager.UpdateRebindPlayerPanelList () (at Assets/Scripts/UIMenuManager.cs:34)
GameManager.UpdateUIMenuPlayerList () (at Assets/Scripts/GameManager.cs:84)
GameManager.SpawnPlayers () (at Assets/Scripts/GameManager.cs:79)
GameManager.SetupActivePlayers () (at Assets/Scripts/GameManager.cs:47)
GameManager.Start () (at Assets/Scripts/GameManager.cs:30)

@andytouch
Copy link

This is generally 'by design' as the spawn logic is a simple For loop Instantiate.

However, I should probably add a toggle for setting an automatic number of warriors to spawn based on number of plugged in devices. Ill leave this issue open until i've done that. :)

@simonbroggi
Copy link

I've got the same behaviour as described by @bradweiers

But if I do have multiple controllers connected, only one is used to controll a warrior and the other warrior is controlled by the keyboard.

How do I controll two warriors each with a controller?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants