AGameModeBase::SwapPlayerControllers

Used to swap a viewport/connection's PlayerControllers when seamless traveling and the new GameMode's controller class is different than the previous includes network handling

Windows
MacOS
Linux

References

Module

Engine

Header

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

Include

#include "GameFramework/GameModeBase.h"

Source

/Engine/Source/Runtime/Engine/Private/GameModeBase.cpp

Syntax

virtual void SwapPlayerControllers
(
    APlayerController * OldPC,
    APlayerController * NewPC
)

Remarks

Used to swap a viewport/connection's PlayerControllers when seamless traveling and the new GameMode's controller class is different than the previous includes network handling

Parameters

Parameter

Description

OldPC

the old PC that should be discarded

NewPC

the new PC that should be used for the player

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