Component
The Local Player component enables local multiplayer functionality when added to any GameObject. When combined with the Character
component, it allows multiple characters to be controlled simultaneously with different input devices.
Player Info
This panel displays runtime information useful during development:
- Player Number: The unique identifier assigned to this Local Player upon spawning
- Split Screen Index: The screen position this Local Player controls during split-screen mode
- Device Name: The input device currently assigned to this Local Player
Player Input
Configure input settings and default states in this panel:
Configuration Options
- Actions: Reference to the Input Action Asset containing player input configurations
- Default Control Scheme: The initial control scheme assigned when the Local Player spawns
- Disable Auto-Switch: When checked, prevents the Local Player from changing input devices
- Default Action Map: The initial action map activated when the Local Player spawns
Input Device Auto-Switching
Auto-switching can only occur when joining is disabled on the Local Player Manager. This prevents device conflicts during the join process.
Control Schemes
Configure different control schemes (Keyboard, Gamepad, etc.) in your Input Action Asset to support various input devices.
Split-Screen Camera
- Split-Screen Camera: The Main Camera GameObject the player will use when split-screen is active. This is usually a child of the Local Player GameObject.
- Shot Camera: The Camera Shot GameObject the Local Player will control when split-screen is active. This Shot Camera reference should be the same as the current shot of the Main Camera for this Local Player.
User Interface
- UI Input Module: Usually assigned through the Setup UI Input instruction, this holds a reference to the UI Input Module this Local Player uses to send events to the UI.
- Canvas: Usually configured through the Setup Canvas instruction, this holds a reference to the Canvas GameObject this Local Player has assigned to their screen.
Persistence
- Survive Scene Load: When checked, the Local Player will automatically be set to not be destroyed on scene loads. This, used along with a persistent Local Multiplayer session, allows for easy management of player and device pairings across the lifetime of your game.