So far I’m having a good experience with the plugins, however it doesn’t seem to support dedicated server. Reasons:
1- CreateSession requires LocalPlayer
On Sessions.h in OnlineServicesInterface) we have CreateSession, which needs this parameter:
/** Id handle for the local user which will perform the action */
FAccountId LocalAccountId;
This doesn’t seem possible to obtain without a LocalPlayer. I tried to pass it nullptr, but it fails. It does require the param.
For reference, Lyra’s code also doesn’t know what to do here.
On UCommonSessionSubsystem::CreateOnlineSessionInternalOSSv2 we find:
FCreateLobby::Params CreateParams;
if (LocalPlayer)
{
CreateParams.LocalAccountId = LocalPlayer->GetPreferredUniqueNetId().GetV2();
}
else if (bIsDedicatedServer)
{
// TODO what should this do for v2?
}
2- No space for multiple artifacts
Services uses a different way of writing artifacts on DefaultEngine.ini.
Subsystem (OSSv1) can be done on editor, you can add how many artifacts you want. On text you can write:
+Artifacts=(ArtifactName=“NAME”,ClientId=“CLIENT_ID”,ClientSecret=“CLIENT_SECRET”,ProductId=“PRODUCT_ID”,SandboxId=“SANDBOX_ID”,DeploymentId=“DEPLOYTMENT_ID”,ClientEncryptionKey=“CLIENT_ENCRYPTION_KEY”)
We can add how many lines we want. And we can reference the different artifacts.
Services (OSSv2) uses this on the file:
[OnlineServices.EOS]
ProductId=PRODUCT_ID
SandboxId=SANDBOX_ID
DeploymentId=DEPLOYTMENT_ID
ClientId=CLIENT_ID
ClientSecret=CLIENT_SECRET
ClientEncryptionKey=CLIENT_ENCRYPTION_KEY
There is only room for one.
The workaround has been to rewrite this whenever you want to build a server or a client. Which is impractical for quick iterations.
Has anyone managed to run a dedicated server and create sessions using OSSv2?