# Detect first launch of the game

**URL:** <https://forums.unrealengine.com/t/detect-first-launch-of-the-game/464999>\
**Category:** Blueprint\
**Tags:** startup, launch, time, game-instance, unreal-engine, question\
**Created:** [May 11, 2020, 9:07am UTC](https://forums.unrealengine.com/t/detect-first-launch-of-the-game/464999 "2020-05-11T09:07:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Teapot\_Creation](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Teapot\_Creation](https://forums.unrealengine.com/u/Teapot_Creation)\
**Post date:** [May 11, 2020, 9:07am UTC](https://forums.unrealengine.com/t/detect-first-launch-of-the-game/464999/1 "2020-05-11T09:07:19Z")

</div>

Hey there,  
is there a way to detect the number of times the game has been launched ?  
IE detect that the game has been launched once, then closed, then launched again, to validate a steam achievement.  
Thanks a lot !

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 11, 2020, 9:16am UTC](https://forums.unrealengine.com/t/detect-first-launch-of-the-game/464999/2 "2020-05-11T09:16:29Z")

</div>

Savegame I’d say. Just put an int in there, and every time the user runs some crucial part of the system ( peristent level / main menu etc ), it gets incremented.

---

<div class="post-metadata">

**Author:** ![KaidoomDev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kaidoomdev/32/977996_2.png) [@KaidoomDev](https://forums.unrealengine.com/u/KaidoomDev)\
**Post date:** [May 11, 2020, 9:19am UTC](https://forums.unrealengine.com/t/detect-first-launch-of-the-game/464999/3 "2020-05-11T09:19:39Z")

</div>

and do it in the game instance.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 11, 2020, 9:30am UTC](https://forums.unrealengine.com/t/detect-first-launch-of-the-game/464999/4 "2020-05-11T09:30:42Z")

</div>

How would that work?

---

<div class="post-metadata">

**Author:** ![Teapot\_Creation](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Teapot\_Creation](https://forums.unrealengine.com/u/Teapot_Creation)\
**Post date:** [May 11, 2020, 10:16am UTC](https://forums.unrealengine.com/t/detect-first-launch-of-the-game/464999/5 "2020-05-11T10:16:55Z")

</div>

Thanks for your answers, that works perfectly.  
I’ve got a custom event in the gameinstance that increments an int after creating (if needed) the samegame, and then saves the slot again.  
This event is called from a level blueprint at beginplay.

---

<div class="post-metadata">

**Author:** ![KaidoomDev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kaidoomdev/32/977996_2.png) [@KaidoomDev](https://forums.unrealengine.com/u/KaidoomDev)\
**Post date:** [May 11, 2020, 10:20am UTC](https://forums.unrealengine.com/t/detect-first-launch-of-the-game/464999/6 "2020-05-11T10:20:00Z")

</div>

Nice, game instance is the first thing that gets created when the game loads and only initializes once so it should work from any level essentially.
