UGameInstance::GetPrimaryPlayerController

Get the primary player controller on this machine (others are splitscreen children) (must have valid player state)

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/GameInstance.h

Include

#include "Engine/GameInstance.h"

Source

/Engine/Source/Runtime/Engine/Private/GameInstance.cpp

Syntax

APlayerController * GetPrimaryPlayerController
(
    bool bRequiresValidUniqueId
) const

Remarks

Get the primary player controller on this machine (others are splitscreen children) (must have valid player state)

Returns

the primary controller on this machine

Parameters

Parameter

Description

bRequiresValidUniqueId

Whether the controller must also have a valid unique id (default true in order to maintain historical behaviour)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss