Avoid multiple instances of an application

Hi everyone!

Does anybody know if there is a way, at Unreal’s engine level, to prevent from having multiple instances of your application running? I mean, once you have your app packaged, if you try to open multiple times the ‘exe’, the application should only launch the first time. Subsequent times, the only effect should be to gain focus of the unique instance you previously launched.

Thanks in advance,

2 Likes

Hi. Maybe for somebody still actual.

For C++ check my gist:

https://gist.github.com/mrbindraw/ue4-cpp-check-app-instance.md

For Blueprints check my plugin:

https://github.com/mrbindraw/CheckAppInstance

Enjoy!

1 Like

love it but ur gist is gone.

1 Like

Hi! Yes I know)
This is same code distributed via ue marketplace like code plugin (free)

Have a epic day!

2 Likes

@Andrew_Bindraw Thx, ur code is so brief and powerful.

But is it possible to move the loading phase earlier?
For example, check the file lock before the window popup, so starting second instance won’t see a new blank window.

We write a plugin, plug & play, just enable the plugin then things get done, starting second UE5 instance won’t see a new blank window now.