Hey,
When using new Steam Socket plugin with Steam OSS, it seems Dedicated server does not call TriggerOnSteamServerLoginCompletedDelegates when connected to GameServer API. Repro seems like build a dedicated server using Steam Socket + Steam OSS and observe server output (+ it won’t be visible in Steam servers list).
As of UE 5.8.1 there are several callbacks FOnlineAsyncTaskManagerSteam, but it seems one callback is missing - FOnlineAsyncTaskManagerSteam::OnSteamServersConnectedGS
Based on some community discussions it looks like a regression.
There are several ways of fixing that, including async task, or simpler version
I adjusted code from Unreal Source Discord server discussion (courtesy to user _giru, link to message). After that change dedicated server works correctly (starts, connectes to GameServer API, announces server etc).
/**
* GameServer API version of connected to the Steam backend callback
*/
void FOnlineAsyncTaskManagerSteam::OnSteamServersConnectedGS(SteamServersConnected_t* CallbackData)
{
FOnlineSessionSteamPtr SessionInt = StaticCastSharedPtr<FOnlineSessionSteam>(SteamSubsystem->GetSessionInterface());
if (!SessionInt.IsValid())
{
return;
}
if (SessionInt->bSteamworksGameServerConnected)
{
return;
}
const FUniqueNetIdSteamRef ServerId = FUniqueNetIdSteam::Create(SteamGameServer()->GetSteamID());
SessionInt->bSteamworksGameServerConnected = true;
SessionInt->GameServerSteamId = ServerId;
AsyncTask(ENamedThreads::GameThread, [Subsystem = SteamSubsystem, ServerId]()
{
if (!Subsystem)
{
return;
}
Subsystem->TriggerOnSteamServerLoginCompletedDelegates(true);
});
}
I could prepare PR on github, though I’m not sure if AsyncTask here is enough, or something more complicated FOnlineAsyncEvent<FOnlineSubsystemSteam> is required.
Does Epic have any plans to fix it? What is current state of this plugin?
p.s. There are smaller things I’ve spotted, like Steam “Game Servers” always show servers as not having password, because OnlineSessionAsyncServerSteam.cpp lists this as TODO; or NumOpenPrivateConnections commented out in GetServerKeyValuePairsFromSession func. I assume this is highly experimental/WIP even on ue6-main
void GetServerKeyValuePairsFromSession(const FOnlineSession* Session, FSteamSessionKeyValuePairs& KeyValuePairs)
{
...
//KeyValuePairs.Add(STEAMKEY_NUMOPENPRIVATECONNECTIONS, FString::FromInt(Session->NumOpenPrivateConnections));
//KeyValuePairs.Add(STEAMKEY_NUMOPENPUBLICCONNECTIONS, FString::FromInt(Session->NumOpenPublicConnections));
}
void UpdatePublishedSettings(UWorld* World, FNamedOnlineSession* Session)
{
...
// @TODO ONLINE Password protected or not
SteamGameServerPtr->SetPasswordProtected(false);
}
Best regards,
Bohdan
[Attachment Removed]