Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/GameFramework > API/Runtime/Engine/GameFramework/AGameModeBase
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 |
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
| Name | Description |
|---|---|
| OldPC | the old PC that should be discarded |
| NewPC | the new PC that should be used for the player |