APlayerController::GetPawnOrSpectator

Returns the first of [GetPawn()](API\Runtime\Engine\GameFramework\AController\GetPawn\1) or [GetSpectatorPawn()](API\Runtime\Engine\GameFramework\APlayerController\GetSpectatorPawn) that is not nullptr, or nullptr otherwise.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/GameFramework/PlayerController.h

Include

#include "GameFramework/PlayerController.h"

Source

/Engine/Source/Runtime/Engine/Private/PlayerController.cpp

Syntax

APawn * GetPawnOrSpectator() const

Remarks

Returns the first of GetPawn() or GetSpectatorPawn() that is not nullptr, or nullptr otherwise.

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