/** * Delegate fired when destroying an online session has completed * * @param SessionName the name of the session this callback is for * @param bWasSuccessful true if the async action completed without error, false if there was an error */ void AShooterPlayerController::OnDestroySessionComplete(FName SessionName, bool bWasSuccessful) { UE_LOG(LogOnline, Log, TEXT("OnDestroySessionComplete: Session=%s bWasSuccessful=%s"), *SessionName.ToString(), bWasSuccessful ? TEXT("true") : TEXT("false") ); IOnlineSubsystem* OnlineSub = IOnlineSubsystem::Get(); if (OnlineSub) { IOnlineSessionPtr Sessions = OnlineSub->GetSessionInterface(); if (Sessions.IsValid()) { Sessions->ClearOnDestroySessionCompleteDelegate(OnDestroySessionCompleteDelegate); } } // continue if(bWasSuccessful) { CleanupSessionOnReturnToMenu(); } }