Refuse to open multiple game instances (.exe)

Hi,
I see no one is talking about this topic, so I’m going to do it here.
So I have my game which is build in .exe, from the moment I click on the .exe several times, for example three times, my game opens three times.
This type of behavior is clearly not desired in the world of video games, which is why I am asking for help to be able to refuse this behavior, especially in multiplayer games.
So do you know how to refuse this behavior like Fortnite or Apex and many other games, a setting on Unreal Engine? Something to code?
Thx you.

1 Like

Hey @MaybeAnge!

For a simple solution, check out this plugin from the Unreal Engine Marketplace:

https://www.unrealengine.com/marketplace/en-US/product/checkappinstance

Otherwise, check out the source code the same user shared in this thread:

Let me know if this works for you!

1 Like

Hi,
Thank you for the answer.
I just implemented the plugin and it’s not really what I want.
When I put it in my “Event init” on the game’s “GameInstance” and run the game a second time, it crashes.
Or did I do something wrong?
When I also launch it, we always see the game open for 1 second then close and display a crash error message.
I just wish the game wouldn’t reappear a second time and crash.

1 Like

Hi @MaybeAnge

It seems something changing in the unreal engine on init event or on process quit.

Please, try to use delay node or set timer by event/function (delay 1 second) before call CheckAnotherAppInstance node.

Thanks for the report.

Hey @MaybeAnge!

Checking in! Did the solution provided by @Andrew_Bindraw above work for you?

1 Like

Hi @Quetzalcodename @MaybeAnge
Thanks for the assist :wink:

I fixed issue, please check:

Uploaded update to the marketplace! :wink:

2 Likes

(post deleted by author)

Hello,

We have just identified the problem…

During the update, Epic Games did not update correctly. The plugin now works great and no more FATAL crashes.

Thx u.

1 Like