Since the usual approach in the examples to onscreen joysticks is to emulate a gamepad I do it like that,
but I wanted to disable Onscreen controls if it detects a change in the control scheme and detects a gamepad
with
///pseudo code
if current.Controlscheme=="gamepad"
{
OnScreencontrolcanvas.SetActive(false);
}
but since both onscreen joystick and real gamepad use the same control scheme, as soon as I try to move the player with the virtual joystick, the OnscreenControlCanvas is disabled.
No, Cuz the Onscreen controls would still be emulating the gampedad control scheme. making the active control scheme the gamepad even when using the touchscreen
I already have the two control schemes , “gamepad” an “Phone”, like I said before since the onscreen controls emulate a gamepad input , the control scheme will always be gamepad,
I also get input stuttering sometimes from the control scheme fighting between the gamepad and touchscreen.
and sometimes the Onscreen controls get stucked and don’t work at all.
I am already using OnControlsChanged(), I am going to ditch OnScreenbutton and OnscreenStick scripts for now, and use the default UI button script for buttons and make a script for the stick.
To the input system developers:
For the Onscreen controls scripts it would be better if instead of biding controlpaths you could bind the Action() itself.