V4.4 - PIE Network Login. Odd interactions with the online subsystems

I’m doing some testing of a custom online subsystem module, and I’ve stumbled across the following issue.
In PIE, there is a case where the editor will go through the OnlineIdentityInterface login.

The login process goes as follows:

  1. PIE starts

  2. It determines this is a network game, and starts login through the OnlineIdentityInterface (PlayLevel.cpp:2041 - LoginPIEInstances)

  3. When login is complete,it creates a world and game instance (PlayLevel.cpp:1988 - CreatePIEWorldFromLogin)

  4. A new world context is created for the instance (GameInstance.cpp:46 - InitPIE)

  5. Gameplay continues, and in some cases, the OnlineIdentityInterface is called for things like Nicknames.

So, here’s the problem…
We’re using a different instance of the OnlineSubsystem for the initial login and any calls after that (getting display name, etc.)

In PIE, the OnlineSubsystem instance is identified by the world context, and the world context changes in step 4, after login completes.

All calls to the OnlineIdentityInterface after step 4 are not logged in.

Hey Roxie-

Are you still seeing this issue occur in 4.6.1 or the latest 4.7 preview? Its possible that this was fixed with changes to the engine but if this is still a problem let us know and we will investigate it further.

Cheers

I coded around it, but when I get some time I can take a look.

I’m playing around in 4.7 preview 8, when I go to use the post login event in MyGame (the gamemode) I seem to have problems casting the new player to things such as MyPlayerState and MyPlayerController. I am doing it in the same way as displayd here https://docs.unrealengine.com/latest/images/Resources/Showcases/BlueprintMultiplayer/Gameplay1.jpg
which was taken from this https://docs.unrealengine.com/latest/INT/Resources/Showcases/BlueprintMultiplayer/index.html#hostingagame
tutorial.

Hey Shinijami-

Are you still having problems in 4.7.2 trying to use the post login event?

Roxie-

Could you post how you managed to code around your problem so that others could use the same method if they are also having this issue?

Cheers

I created a game-specific game instance from UGameInstance in the normal way, and I then overrided InitPIE to call the OnlineSubsystem Login stuff. It looks like the GameInstance Init stuff has changed a bit since I did this, though, so I guarantee nothing.

Ultimately, I just stopped debugging this stuff while in the editor. Instead, I just run ‘-game’ or ‘-server’ debugging as if I were really in-game.