Using the input system I have a script for a third person controller. In that script i have some statements declaring what methods to run when an input action is performed it looks like this:
PlayerControls controls; //This is the input action asset
void Awake()
{
controls = new PlayerControls();
controls.Gameplay.Block.performed += ctx => BlockBegin();
controls.Gameplay.Block.canceled += ctx => BlockEnd();
controls.Gameplay.Dodge.performed += ctx => DodgeBegin();
controls.Gameplay.Dodge.canceled += ctx => DodgeEnd();
controls.Gameplay.Roll.performed += ctx => Roll();
controls.Gameplay.StimPulse.performed += ctx => StimPulse();
What I need to do is tell it to only listen to one input device. Ideally something like this:
controls.InputDevice = Gamepad.all[0]
///Then in an identical copy of this script i would change it to
controls.InputDevice = Gamepad.all[1]
///This way i could have local multiplayer
I need to do this because I cant spawn in a new prefab with player input manager, there are too many things that need to be done manually to my player objects.
PLEASE PLEASE, if you have any idea or suggestions on how I could do local multiplayer without spawning new prefabs you would literally be the reason I manage to complete this final project. I cannot find anything on this, its to the point where if I do manage to do it I will be making a guide on youtube as to how to do it, I dont believe it should be this hard to figure out.