Quick Win 3: Make it work for more than one player

This is where Unity starts to feel powerful.

So far, you built:

  • A clean input reader
  • A structured PlayerController
  • Movement that rotates properly

Now we answer a bigger question:

What happens when you add Player 2?


Why this matters

Most beginner projects break right here.

Because they built everything assuming:

  • There is only one player
  • There is only one input source
  • Everything lives in one object

You didn’t do that.

You separated input from movement.

That decision pays off now.


Step 1: Add a PlayerInputManager

In the Hierarchy:

Right-click → Create Empty
Rename it: GameManager

With GameManager selected:

Add Component → PlayerInputManager


Step 2: Configure it

In the PlayerInputManager component:

  • Set Join Behavior to Join Players When Button Is Pressed
  • Set Player Prefab to your Player object

Drag your Player from the Hierarchy into the Project window first to turn it into a prefab.


Step 3: Press play

Press Play.

Press a button on a second controller (or keyboard).

A second player spawns.


What just happened

You didn’t rewrite your controller.

You didn’t duplicate logic.

The same Player prefab works for:

  • 1 player
  • 2 players
  • 4 players

Because your structure assumed scaling from the beginning.


This is the mindset shift

Beginners build features.

Developers build systems.

You are building systems now.


Stop here

Do not add combat yet.
Do not add UI.
Do not add health bars.

Let the idea settle: your project can scale.


Tomorrow

Tomorrow, we’ll make the camera adapt automatically to multiple players.

Dan