I am making a slightly-physics-based two-player offline game where you try to push your opponent off the edge of a platform. I have created a prefab for the players. I want to be able to have different controls for the Input.GetAxis() method simultaneously, so that both players can be controlled by one script. For example, pressing W will move Player 1 upwards, and pressing Up Arrow will move Player 2 upwards.
You just need to create something to distinguish the two players together: enum, tag, vv…
if(Player1)
{
// use Input.GetAxis ()
}
else if(Player2)
{
//use Up Arrow
}