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?