Ejemplo n.º 1
0
void APlayerState::RegisterPlayerWithSession(bool bWasFromInvite)
{
	if (GetNetMode() != NM_Standalone)
	{
		IOnlineSessionPtr SessionInt = Online::GetSessionInterface(GetWorld());
		if (SessionInt.IsValid() && UniqueId.IsValid())
		{
			// Register the player as part of the session
			const APlayerState* PlayerState = GetDefault<APlayerState>();
			SessionInt->RegisterPlayer(PlayerState->SessionName, *UniqueId, bWasFromInvite);
		}
	}
}