- Home /
Changing the Standalone Input Manager variables
I have been trying to change the input variables in the Standalone Input Manager through script but have found no way to access them.
In a multiplayer match, I wish the Submit and Cancel buttons to be assigned based on which player pressed the start button first. So as in the picture, these would change to be P2_Submit, P2_Cancel, P3_Submit, etc.
![alt text][1]
In my code it would be something like: string prefix = "P1_" (or "P2_", etc) if(Input.GetButtonDown(prefix + "Start") Have player prefix be assigned to the submit and cancel buttons. GetComponent().SubmitButton = prefix + "Submit"
Answer by hexagonius · Oct 09, 2015 at 07:53 AM
you cannot change the setup of the Input manager. you can however create every input needed there and assign them their function. So don't try to change the actual button for the name but assign the players the right ones
Answer by 8r3nd4n · Oct 09, 2015 at 09:48 AM
I'm not sure if I misunderstand your response.
I have set up all 4 players in the input manager for the appropriate buttons. It is the variables in the Standalone Input Manager component that is part of the event system of the Unity UI that I wish to change in script. Not the name of the buttons, but the value they hold.
Maybe it isn't possible.
Your answer
Follow this Question
Related Questions
How to get UI elements such as Scroll Rect to work with new input system? 0 Answers
World space GUI interaction with just a crosshair and a keyboard 0 Answers
Send UI Button Event with key press NOT onClick()??? 2 Answers
GraphicRaycaster UI event issue with Unity v5.2.0bx 1 Answer
Clicking Trigger 1 Answer