Download

Intermittent Problem With Steam Online Subsystem Reverting to Null Subsystem

I have setup my defaultengine.ini to use Steam by putting this in DefaultEngine.ini



 [/Script/Engine.GameEngine] +NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")  [OnlineSubsystem] DefaultPlatformService=Steam  [OnlineSubsystemSteam] bEnabled=true SteamDevAppId=480  [/Script/OnlineSubsystemSteam.SteamNetDriver] NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection" 

I am launching the game from Command line (PowerShell) with the following:


"D:\Unreal Projects\UE_4.18\Engine\Binaries\Win64\UE4Editor.exe" "C:\Users\dell\Desktop\MultiPlayerProject\MPSteamExample\MPSteamExample.uproject" -game -log

I have the following CPP code in the Init Portion of the GameInstance class to telling me what subsystem I am using.




        IOnlineSubsystem* Subsystem = IOnlineSubsystem::Get();
        if (Subsystem != nullptr)
        {
            UE_LOG(LogTemp, Warning, TEXT("Using The Subsystem : %s"), *Subsystem->GetSubsystemName().ToString());
        }



The result of launching via command line closing it and then launching again a few times in a row will give me the message “Using The Subsystem : NULL” about half of the time and “Using The Subsystem : STEAM” about half of the time.

Does anyone know what can be causing this?

I have some more information on this. It connects to steam successfully almost every time if the editor is open and I launch the game from the command line. But if the editor is closed it is 50/50.
Maybe this is just a problem with Launching via editor when editor is closed??

If anyone has more info on this I would really like to know.