This would be an input issue.
in the unity input thing, you will have p1jump p2jump p1attack p2 attack
youre gonna have two FSMs. one for each player that waits for each players input, and each prefab will listen to their own FSM
it wont matter if you have on screen buttons or get controller input. its handled the same way with the unity input system at its core.
Playmaker would just get input and send it to unities input manager by name