# EOS\_Platform\_CheckForLauncherAndRestart code sample? 

**URL:** <https://forums.unrealengine.com/t/eos-platform-checkforlauncherandrestart-code-sample/2858257>\
**Category:** Developer Portal\
**Tags:** epic-online-services, question\
**Created:** [March 13, 2025, 1:10am UTC](https://forums.unrealengine.com/t/eos-platform-checkforlauncherandrestart-code-sample/2858257 "2025-03-13T01:10:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [March 13, 2025, 1:10am UTC](https://forums.unrealengine.com/t/eos-platform-checkforlauncherandrestart-code-sample/2858257/1 "2025-03-13T01:10:28Z")

</div>

I’m trying to make basic setup of EOS into my Unity game, and wanted to implement checking if a game was started through Epic launcher. For Steam this is done through SteamAPI.RestartAppIfNecessary, and I figured out the EOS analogue is EOS\_Platform\_CheckForLauncherAndRestart.

I have downloaded and installed both OpenEOS and PlayEveryWare plugins, but neither use this function in any of their samples. I also searched everywhere on the Internet, but apart from this single page (which just says this function exists, and has no sample code):

[https://dev.epicgames.com/docs/en-US/api-ref/functions/eos-platform-check-for-launcher-and-restart](https://dev.epicgames.com/docs/en-US/api-ref/functions/eos-platform-check-for-launcher-and-restart)

there aren’t any tutorials, code samples, or any guides on how and where to properly implement this function into EOS manager script. Can somebody please help a newbie? I don’t need any other EOS functionality for now, only initialization and checking if game was started through Epic launcher.

[https://dev.epicgames.com/docs/en-US/api-ref/functions/eos-platform-check-for-launcher-and-restart](https://dev.epicgames.com/docs/en-US/api-ref/functions/eos-platform-check-for-launcher-and-restart)

---

<div class="post-metadata">

**Author:** ![SebBergy2.0](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sebbergy2.0/32/1214708_2.png) [@SebBergy2.0](https://forums.unrealengine.com/u/SebBergy2.0)\
**Post date:** [July 28, 2025, 7:35pm UTC](https://forums.unrealengine.com/t/eos-platform-checkforlauncherandrestart-code-sample/2858257/2 "2025-07-28T19:35:14Z")

</div>

Hey, immediately after EOS\_Platform\_Create is called, you can call this API.

```auto
	EOS_EResult Result = EOS_Platform_CheckForLauncherAndRestart(FPlatform::GetPlatformHandle());

	switch (Result)
	{
	case EOS_EResult::EOS_Success:
		// Clean up as the game will be relaunched by the launcher
		break;
	case EOS_EResult::EOS_NoChange:
		// The game was launched by the launcher
		break;
	case EOS_EResult::EOS_UnexpectedError:
		// There was an error either checking if the game wa launched by the launcher or trying to relaunched it via the launcher - up to you on how you want to handle this - output a log message
		break;
	default:
		// Unexpected to be here - output a log message with the result code - up to you on how you want to handle this
		break;
	}

```

The code is in C++, you’ll need to translate to C#. I don’t work on the Unity plugin, but looking at the code, it looks like the best place for this is in the EOSManager class. You could create a private function with this logic and call it at the end of the Init function before calling the InitializeOverlay function.
