UEngine::GetFirstGamePlayer

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

Choose your operating system:

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
(
    UPendingNetGame * PendingNetGame
)

Remarks

Return the first ULocalPlayer in the GamePlayers array.

Returns

first ULocalPlayer or nullptr if the array is empty