How to properly spawn a second local player and add him to the Session?

Hi,
Currently i create a second player using the CreatePlayer BluePrint. However this player does not count towards the currently joined numbers of players within an OnlineSession.

If i create a game with 2 local players, the number of players in an onlinesession is still 1. According to what is called, IOnlineSession::RegisterPlayers is called when the session is created. But only with one player.

What do i need to do?

IOnlineSession::RegisterLocalPlayer?

Solution/Tips in C++ if possible. Blueprunt(if explained in detail and where to look for, too)

I’m after this information too. Preferably in blueprint.

help me getting attention by voting :wink:

Hi did you ever work it out?

Nope, no luck so far :frowning:

Did you actully tried to use RegisterLocalPlayer?

Hello, im currently looking through ShooterGameExample and u should take a look at ShooterGameInstance:OnJoinComplete. There is the code u wanna use.

auto Sessions = Online::GetSessionInterface();
		if (Sessions.IsValid() && LocalPlayers[1]->GetPreferredUniqueNetId().IsValid())
		{
			Sessions->RegisterLocalPlayer(*LocalPlayers[1]->GetPreferredUniqueNetId(), NAME_GameSession,
				FOnRegisterLocalPlayerCompleteDelegate::CreateUObject(this, &UShooterGameInstance::OnRegisterJoiningLocalPlayerComplete));
		}