UEngine::GetFirstGamePlayer

Return the first [ULocalPlayer](API\Runtime\Engine\Engine\ULocalPlayer) in the GamePlayers array.

Windows
MacOS
Linux

References

Module

Engine

Header

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

Include

#include "Engine/Engine.h"

Source

/Engine/Source/Runtime/Engine/Private/UnrealEngine.cpp

Syntax

ULocalPlayer * GetFirstGamePlayer
(
    const UGameViewportClient * InViewport
)

Remarks

Return the first ULocalPlayer in the GamePlayers array.

Returns

first ULocalPlayer or nullptr if the array is empty

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