class

FLocalPlayerManager

Module
Game
Header
#include "Game/LocalPlayer.h"
Namespace
Mowo

Properties

TypeNameDescription
static constexpr int32_tkMaxLocalPlayersDefault 4.

Public functions

ReturnsNameDescription
FLocalPlayer&AddLocalPlayerAdd a player driven by gamepadIndex (-1 = keyboard/mouse).
boolRemoveLocalPlayer
voidClear
const std::vector<FLocalPlayer>&GetLocalPlayers
int32_tGetLocalPlayerCount
FLocalPlayer*GetByPlayerIndex
const FLocalPlayer*GetByPlayerIndex
FLocalPlayer*GetByGamepad
int32_tPlayerIndexForGamepadPlayer index a gamepad slot routes to, or -1 when the slot owns no player (the input layer drops the event, or hands it to player 0's keyboard fallback, as the game prefers).
voidBindControllerHands the player's controller its input instance (UE's ULocalPlayer::PlayerController); bindings, mapping contexts and pushed contexts then evaluate against that player's devices only.
voidUpdateInputsAdvances every per-player input instance; the global one is advanced by the engine loop.
voidSetLayout
ESplitScreenLayoutGetLayout
int32_tRecomputeLayoutRetile the panes for the current player count and screen size, writing each player's rect.
boolRendersCameraWhether a scene camera draws this frame.

Function details

AddLocalPlayer

C++
FLocalPlayer& AddLocalPlayer(int32_t gamepadIndex)

Add a player driven by gamepadIndex (-1 = keyboard/mouse). Assigns the next free playerIndex and returns the new player. Refuses past kMaxLocalPlayers, and refuses a gamepad slot already owned by another player — returns the existing owner in that case.

RemoveLocalPlayer

C++
bool RemoveLocalPlayer(int32_t playerIndex)

Clear

C++
void Clear()

GetLocalPlayers

C++
const std::vector<FLocalPlayer>& GetLocalPlayers() const

GetLocalPlayerCount

C++
int32_t GetLocalPlayerCount() const

GetByPlayerIndex

C++
FLocalPlayer* GetByPlayerIndex(int32_t playerIndex)

GetByPlayerIndex

C++
const FLocalPlayer* GetByPlayerIndex(int32_t playerIndex) const

GetByGamepad

C++
FLocalPlayer* GetByGamepad(int32_t gamepadIndex)

PlayerIndexForGamepad

C++
int32_t PlayerIndexForGamepad(int32_t gamepadIndex) const

Player index a gamepad slot routes to, or -1 when the slot owns no player (the input layer drops the event, or hands it to player 0's keyboard fallback, as the game prefers).

BindController

C++
void BindController(int32_t playerIndex, APlayerController* controller)

Hands the player's controller its input instance (UE's ULocalPlayer::PlayerController); bindings, mapping contexts and pushed contexts then evaluate against that player's devices only.

UpdateInputs

C++
void UpdateInputs(float deltaSeconds)

Advances every per-player input instance; the global one is advanced by the engine loop. Once per frame, with engine time.

SetLayout

C++
void SetLayout(ESplitScreenLayout layout)

GetLayout

C++
ESplitScreenLayout GetLayout() const

RecomputeLayout

C++
int32_t RecomputeLayout(uint32_t screenW, uint32_t screenH)

Retile the panes for the current player count and screen size, writing each player's rect. Does NOT touch cameras — the caller copies player.rect onto its CameraComponent. Returns the pane count.

RendersCamera

C++
bool RendersCamera(EntityID camera) const

Whether a scene camera draws this frame. With one player every camera does; in split screen only the cameras the players look through do, since any other camera (the pawn's own, a stray one) still carries a full-screen viewport and painted over every pane.

Generated from Game/LocalPlayer.h via game.json · Nov 5, 2026Version 1.0.0