Added Part 1 of 2 for Local Multiplayer / couch co-op with gamepads
edit
You know what…there’s some really really ugly behavior when using UnityEvent callbacks here… I’m going to redo this tutorial and file a proper bug report. UnityEvent’s are called twice with the same phase for each action… and the Player Join event doesn’t consume the event so its extra confusing when your prefab is getting input before it has a chance to run Awake…
Thank you for pointing out that the generated c# class is meant as an alternative to PlayerInput. Other tutorials and guides I’ve seen make it seem like the former is the way to do c# events with Input System, which ends of being a dead end if you’re doing local multiplayer. Also, you can get individual actions and subscribe to them from PlayerInput using FindActionMap and FindAction. (eg. MyPlayerInput.actions.FindActionMap(“ActionMapName”).FindAction(“ActionName”) )
Thank you for the tutorials did you try the other options for triggering the joining of a Player and see what happens ,
i was supprised to see that till version 1.2 if you wanted the joining to be triggered when a specific button is pressed if you used for example 2 gamepads only the first one would be joined.( on 1.3 it is fixed with 2 gamepads)
Not to mention that if you use on-screen components and player input nothing works anymore if you wire everything (add the action maps to Playinput, add the multiplayer event system everywhere).
Somehow these components don’t seem to work well together so far and probably because of complexity they are still far away from being ready for production
Nice videos!
I watched them all, but is there any way I can spawn players with different prefabs?
In my current game I have 2 players but each plays as a different character.