UEngine::GetLocalPlayerFromControllerId

Retrieves the LocalPlayer for the player which has the ControllerId specified

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 * GetLocalPlayerFromControllerId
(
    const UGameViewportClient * InViewport,
    const int32 ControllerId
) const

Remarks

Retrieves the LocalPlayer for the player which has the ControllerId specified

Returns

The player that has the ControllerId specified, or nullptr if no players have that ControllerId

Parameters

Parameter

Description

ControllerId

the game pad index of the player to search for