UGameplayStatics::GetPlayerCharacter

Returns the player character (NULL if the player pawn doesn't exist OR is not a character) at the specified player index

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Kismet/GameplayStatics.h

Include

#include "Kismet/GameplayStatics.h"

Source

/Engine/Source/Runtime/Engine/Private/GameplayStatics.cpp

Syntax

static ACharacter * GetPlayerCharacter
(
    const UObject * WorldContextObject,
    int32 PlayerIndex
)

Remarks

Returns the player character (NULL if the player pawn doesn't exist OR is not a character) at the specified player index

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