Skip to content
Back
This page's table of contents

User guide

SimpleLauncher User Guide

Complete product user guide for SimpleLauncher

  • Unreal Engine 5.2–5.8
  • Version 1.1.0 (Version 2)

Launch an external program from your game in just two steps:

Step 1: Configure a Preset

Open Project Settings → Plugins → Simple Launcher, and add a preset in Launchers:

  • Set Key to a preset name, e.g. MyServer
  • Set CommandLine to the command to execute, e.g. notepad.exe or python script.py

Step 2: Call the API to Launch

Call from Blueprint or C++:

FProcessId Id = USimpleLauncherGameSubsystem::StartProcess(FName("MyServer"));

The program will start. When the game exits, the plugin will automatically shut it down.

Each preset contains the following settings:

A name for this preset. All APIs reference presets by this name.

  • Use any name you like, e.g. MyServer, Logger, DataSync
  • Names must be unique across all presets

The full command to execute, including the program path and arguments.

notepad.exe file.txt
"C:\Program Files\app.exe" -port 8080
'/usr/bin/app' -arg

If the path contains spaces, you must wrap the program path in quotes, otherwise parsing will fail.

Whether to hide the program window. Defaults to false (window visible).

  • Set to true: the program runs in the background with no visible window
  • Ideal for background services or tools that don’t need user interaction

Controls whether the program is shut down when the game exits. Defaults to false (shut down with game).

  • false (default): the program is automatically closed when the game exits — ideal for game servers, temporary tools
  • true: the program continues running after the game exits — ideal for log collectors or other persistent services

The working directory for the program. Defaults to empty (uses the game’s working directory).

  • Use an absolute path, e.g. C:\MyApp or /home/user/app
  • Relative paths used by the program will resolve based on this directory

All APIs are static functions on USimpleLauncherGameSubsystem, callable from both Blueprint and C++.

FunctionDescription
UpdateConfig(Name, Config, bOverrideIfExists, bCreateIfNotExists)Create or update a preset
GetConfig(Name, OutConfig)Get preset configuration
GetAllConfig()Get all presets
RemoveConfig(Name)Remove a preset (also stops all its processes)

UpdateConfig has two optional parameters for precise control:

ParameterDefaultDescription
bOverrideIfExiststrueWhether to overwrite if the preset already exists. Set to false to prevent accidental overwrites
bCreateIfNotExiststrueWhether to create if the preset doesn’t exist. Set to false to only update existing presets

In addition to configuring presets in Project Settings, you can create them dynamically at runtime:

FLauncherConfig Config;
Config.CommandLine = TEXT("python script.py");
Config.bLaunchHidden = true;
USimpleLauncherGameSubsystem::UpdateConfig(FName("TempTask"), Config);

Presets created at runtime are lost when the game restarts. For persistent presets, configure them in Project Settings.

FunctionDescription
StartProcess(Name)Start a process, returns ProcessId
StopProcess(ProcessId)Stop a single process
StopProcesses(Name)Stop all processes for a preset
StopAllProcesses()Stop all processes

You can call StartProcess multiple times on the same preset. Each call launches a new process and returns a different ProcessId:

FProcessId Id1 = USimpleLauncherGameSubsystem::StartProcess(FName("MyServer"));
FProcessId Id2 = USimpleLauncherGameSubsystem::StartProcess(FName("MyServer"));
// Id1 和 Id2 是两个独立运行的进程
FunctionDescription
IsProcessRunning(ProcessId)Check if a specific process is still running
HasRunningProcesses(Name)Check if a preset has any running processes
GetProcessCount(Name)Get the number of running processes for a preset
GetProcesses(Name)Get all running ProcessIds for a preset

Get notified when a process exits and execute custom logic (e.g. restart, logging).

FunctionDescription
BindProcessExited(ProcessId, Delegate)Listen for a specific process exit
UnbindProcessExited(ProcessId, Delegate)Stop listening for a specific process
BindProcessesExited(Name, Delegate)Listen for all process exits under a preset
UnbindProcessesExited(Name, Delegate)Stop listening for a preset

The callback receives two parameters:

  • ProcessId — which process exited
  • bNaturalExit — exit reason: true means the program terminated on its own, false means it was stopped by code

When callbacks are triggered:

ScenarioCallback TriggeredbNaturalExit
Program finishes or crashes on its ownYestrue
Stopped via StopProcessYesfalse
Stopped via StopProcessesYesfalse
Stopped via RemoveConfigYesfalse
Auto-cleanup on game exitNo-

Binding the same delegate multiple times is silently ignored — it won’t trigger duplicate callbacks.

Callbacks are not triggered during game exit to avoid accessing destroyed objects, which would cause crashes.

  • UpdateConfig only updates configuration data and does not affect already running processes. The new configuration takes effect on the next StartProcess call.
  • RemoveConfig stops all processes for the preset before removing it. However, bound callbacks are not cleared — they remain active if you recreate a preset with the same name.

The plugin supports Windows, Linux, and macOS. It uses UE’s FPlatformProcess::CreateProc under the hood, so any program the OS can execute can be launched — there are no file type restrictions.

Open Edit → Project Settings, select the SimpleLauncher settings page, and set Language to English or Chinese. English is the default. Available user-facing UI, tooltips, notifications, and functional logs update immediately without restarting the editor. Public API names and module startup/shutdown logs remain in English.

For usage questions or collaboration, please visit the contact page.

Launch and manage external programs through named presets. The same preset can run multiple instances.

The plugin uses presets to manage process configuration:

USTRUCT(BlueprintType)
struct FLauncherConfig
{
// 完整命令行(可执行文件路径 + 参数)
FString CommandLine;
// 隐藏进程窗口
bool bLaunchHidden = false;
// 分离运行(true=游戏退出后进程继续运行)
bool bLaunchDetached = false;
// 工作目录
FString WorkingDirectory;
};

You can configure multiple launchers in Project Settings, each with an independent name:

Path: Edit > Project Settings > Simple Launcher

Launchers:
"LocalServer" → "D:/Server/server.exe --port 7777"
"LogCollector" → "python D:/Tools/log_collector.py"
"AIService" → "D:/AI/inference.exe --model gpt"

Start a process:

// 通过预设名称启动
FProcessId Id = USimpleLauncherGameSubsystem::StartProcess("LocalServer");

Stop processes:

// 停止单个进程
StopProcess(ProcessId);
// 停止某个预设的所有实例
StopProcesses("LocalServer");
// 停止所有进程
StopAllProcesses();

Automatic cleanup:

When bLaunchDetached = false (the default), the plugin automatically terminates the process when the game exits, managing process cleanup at shutdown. Detached processes with this value set to true continue running after the game exits.

The same preset can launch multiple instances, each with an independent FProcessId:

USTRUCT(BlueprintType)
struct FProcessId
{
FName Name; // 预设名称
int32 Index; // 实例索引(自动递增)
};
// 启动3个本地服务器实例
FProcessId Server1 = StartProcess("LocalServer"); // Index = 0
FProcessId Server2 = StartProcess("LocalServer"); // Index = 1
FProcessId Server3 = StartProcess("LocalServer"); // Index = 2
// 独立管理每个实例
StopProcess(Server2); // 只停止第二个
IsProcessRunning(Server1); // 检查第一个是否在运行
GetProcessCount("LocalServer"); // 返回 2(还剩两个在运行)

The plugin polls process status through Tick and supports exit notifications at two levels:

Individual process callback:

// 监听特定进程的退出事件
BindProcessExited(ProcessId, OnExitDelegate);
// 回调参数:ProcessId, bNaturalExit(true=自然退出,false=被强制停止)

Preset-level callback:

// 监听某个预设下所有实例的退出事件
BindProcessesExited("LocalServer", OnExitDelegate);

Typical use: automatic restart:

OnProcessExited(ProcessId, bNaturalExit):
if bNaturalExit:
// 进程意外退出,自动重启
StartProcess(ProcessId.Name)

In addition to static editor configuration, the plugin supports dynamic management at runtime:

// 运行时更新配置
UpdateConfig("DynamicServer", NewConfig, true, true);
// 查询配置
GetConfig("LocalServer", OutConfig);
// 获取所有配置
GetAllConfig();
// 删除配置(同时停止该预设的所有进程)
RemoveConfig("OldServer");

The plugin automatically handles quoted paths and argument splitting:

// 支持带空格的路径
"C:/Program Files/MyApp/app.exe" --port 8080
// 也支持不带引号的简单路径
D:/Tools/server.exe --config default

Scenario 1: Start a Local Server with the Game

Section titled “Scenario 1: Start a Local Server with the Game”
1. Configure the "LocalServer" preset in Project Settings
CommandLine: "D:/Server/dedicated_server.exe -port=7777"
bLaunchHidden: true
bLaunchDetached: false // 游戏退出时自动关闭
2. When the game starts:
StartProcess("LocalServer")
3. When the game exits:
The plugin automatically terminates the server process
1. Configure a Python script preset
CommandLine: "python D:/Scripts/data_processor.py --input data.json"
bLaunchHidden: true
2. Start it when needed:
FProcessId Id = StartProcess("DataProcessor")
BindProcessExited(Id, OnDataProcessed)
3. The callback is triggered automatically when the script finishes
// 启动多个服务器实例
for i in 0..4:
StartProcess("TestServer")
// 查询运行状态
GetProcessCount("TestServer") // 5
// 测试完成后一键停止
StopProcesses("TestServer")

Copy the plugin folder into the project’s Plugins directory and restart the editor.

Path: Edit > Project Settings > Simple Launcher

Add the launcher configurations you need.

All functions are in the SimpleLauncher category. The core workflow is:

1. StartProcess("预设名") → Obtain ProcessId
2. IsProcessRunning(ProcessId) → Check status
3. BindProcessExited(ProcessId, Callback) → Listen for exit
4. StopProcess(ProcessId) → Stop manually

When bLaunchDetached is false, game shutdown cleans up processes launched by that configuration. When true, the processes can continue running. Choose the setting according to the external program’s purpose to avoid closing programs that still need to run when testing stops.