多人网络游戏的GameMode的API调用和Event触发顺序
World.cpp >>>
AGameModeBase::InitGame - C++
Actors PreInitializeComponents()
AGameModeBase::PreInitializeComponents()
AGameModeBase::InitGameState() - C++
World.cpp >>>
AGameModeBase::PreLogin - C++
UWorld::SpawnPlayActor()
AGameModeBase::Login() - C++
AGameModeBase::SpawnPlayerController() - C++
AGameModeBase::InitNewPlayer() - C++
AGameModeBase::FindPlayerStart() - C++/BP
AGameModeBase::FindPlayerStart_Implementation()
AGameModeBase::ChoosePlayerStart() - C++/BP
SpectatorOnly!=1 ? AGameModeBase::MustSpectate() - C++/BP
AGameModeBase::ChangeName() - C++
AGameModeBase::K2_OnChangeName - BP. Alias: OnChangeName
AGameModeBase::PostLogin - C++。第一个可以在PlayerController上安全RPC的地方或时机。
AGameModeBase::GenericPlayerInitialization()
AGameModeBase::InitializeHUDForPlayer() - C++/BP
AGameModeBase::MustSpectate() - C++/BP
AGameModeBase::K2_PostLogin() - BP. Alias: OnPostLogin()
AGameModeBase::HandleStartingNewPlayer() - C++/BP
AGameModeBase::HandleStartingNewPlayer_Implementation()
AGameModeBase::MustSpectate() - 见上
AGameModeBase::PlayerCanRestart() - C++/BP
AGameModeBase::RestartPlayer() - C++
AGameModeBase::FindPlayerStart() - 见上
AGameModeBase::RestartPlayerAtPlayerStart() - C++
AGameModeBase::MustSpectate() - 见上
if-else ? AGameModeBase::GetDefaultPawnClassForController() - C++/BP
AGameModeBase::SpawnDefaultPawnFor() - C++/BP
AGameModeBase::SpawnDefaultPawnFor_Implementation()
AGameModeBase::SpawnDefaultPawnAtTransform() - C++/BP
if-else ? AGameModeBase::InitStartSpot() - C++/BP
if-else ? AGameModeBase::FinishRestartPlayer() - C++
if-else ? AGameModeBase::K2_OnRestartPlayer() - BP. Alias: OnRestartPlayer
Controller.cpp >>>
AController::Destroyed()
AGameModeBase::Logout() - C++
AGameModeBase::K2_OnLogout() - BP. Alias: OnLogout
UGameplayStatics::ParseOption() - 调查支持哪些参数