Can you detect if a game is launched through the Epic Games Launcher?

I’m setting up EOS integration in a Unity project. So far, I’ve been able to sign the player in via the Auth Interface and the Connect Interface. However, I noticed that the social overlay appears even when testing a local build (and I’m assuming this would happen on Steam as well). I suppose that’s because the EOS service is running on my computer, even if the client is closed.

Is there a way to only connect to EOS if the player is playing through the Epic client?

Hi there!

We’ll be happy to assist. You can see how to use the CheckForLaunchAndRestart API by following the link below to check whether or not the launcher was used to launch the game and restart it, if not.

We hope this helps!

Kendall

1 Like

Hey, thanks for the quick reply.

Well, that half-solves the problem. Is there any way to check for the launcher without restarting the game? It looks like simply calling CheckForLauncherAndRestart() causes the Epic launcher to open on my computer, regardless of the returned Result code.

I’m basically trying to initialize the EOS overlay if the user is playing through the Epic launcher, but not if they’re on Steam or GOG. I haven’t tested this yet, but I assume that it’ll show duplicate achievement popups if both the Steam and Epic overlays are simultaneously enabled.

Hi again!

Thanks for following up! One other option you could attempt is checking for the launch arguments passed by the Epic Games Launcher. The launcher should always pass an exchange code (AUTH_PASSWORD) and user details (epicusername, upicuserid) among other arguments when launching a game. You can read more about these in the link below.

We hope this helps!

Kendall

That works for me - thanks!

If any Unity users come across this, you can get the application’s launch arguments with System.Environment.GetCommandLineArgs().

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.