Calling CheckForLauncherAndRestart without SandboxId

Hello,

According to this page: Epic Games Store Testing Guide | Epic Online Services Developer

It says we should read the SandboxId from the command line.

However, we need the sandboxId to create the PlatformHandle, and we need the PlatformHandle to call the EOS_Platform_CheckForLauncherAndRestart function to check if we have the sandboxId.

So if we don’t have the SandboxId from the command line, we know we aren’t launched from the launcher, but we can’t restart the game as the EOS_Platform_CheckForLauncherAndRestart can’t be called with a nullptr parameter.

Any advice on how to deal with this?

I’m currently just using a hardcoded sandbox id if I don’t get one from the command line, but it’s not very clean, IMO.

Thanks

Hey! Hardcoded sandbox ID is a valid enough approach and has been used. For a bit of a behind the curtains, before SPT titles shipped on EGS only worked from the live sandbox when it came to artifact creation. That means hardcoding or reading from an file was not uncommon as there was only one possible option (at least for the sandbox ID). You do raise a good point with the introduction of SPT. I’ll surface it with the team to discuss internally how we could handle this in the future.

Worth noting that along with a sandbox ID being missing, the Auth Password (For the exchange code) would also be missing, possibly a few other things as well.