Collapse Launcher’s plugin system lets community developers ship support for additional games without modifying the launcher’s core codebase. A plugin is a native Windows DLL built with NativeAOT that Collapse loads at runtime, communicating with it through COM Interop interfaces defined inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/CollapseLauncher/Collapse/llms.txt
Use this file to discover all available pages before exploring further.
Hi3Helper.Plugin.Core.
What plugins can do
Game management
Report install state, installed version, latest API version, preload availability, and expose install/update/uninstall routines that Collapse drives via
IGameInstaller.Launcher UI content
Supply background images, logo overlays, news articles, carousel banners, and social media links through
ILauncherApiMedia and ILauncherApiNews.Multiple regions
A single plugin DLL can expose multiple
IPluginPresetConfig instances — one per game region or server type — each with its own metadata, zone name, and API endpoints.Self-updating
Plugins can provide a CDN list or implement
IPluginSelfUpdate so the launcher can check for and download updates without user intervention.How plugin loading works
Collapse looks for plugin directories in its plugin folder. Each directory whose name matches the patternHi3Helper.Plugin.* is treated as a candidate plugin. The loader follows this sequence:
- Manifest discovery — The loader reads
manifest.jsonfrom the directory root to obtain the DLL filename and asset list. - Sentinel checks — Before loading, pending operations (deletion, update application) are applied and the
_markDisabledsentinel is checked. Disabled plugins are registered in memory without loading the DLL. - DLL load —
NativeLibrary.TryLoadmaps the DLL into the process. - Required export resolution — The loader resolves
GetPluginStandardVersion,GetPluginVersion,GetPlugin, andSetLoggerCallback. If any export is missing, the plugin is rejected. - Logger injection — A managed callback delegate is passed to
SetLoggerCallbackso plugin log output flows into Collapse’s logging system. - COM object retrieval —
GetPluginreturns avoid*COM pointer that is marshalled to anIPluginmanaged interface viaComInterfaceMarshaller<IPlugin>. - Preset config enumeration —
IPlugin.GetPresetConfigCountandIPlugin.GetPresetConfigiterate over allIPluginPresetConfiginstances, which are wrapped and registered into Collapse’s metadata system. - Optional services — The loader optionally resolves
GetPluginUpdateCdnList,SetDnsResolverCallback,SetDnsResolverCallbackAsync, andRegisterSpeedThrottlerService.
The plugin folder path is controlled by
LauncherConfig.AppPluginFolder. You can open it from the Plugin Manager UI inside Collapse Launcher.Architecture: COM Interop + NativeAOT
Collapse Launcher is a .NET 10 WinUI 3 application. Plugins are built as unmanaged native DLLs — typically with NativeAOT — that expose a C ABI entry point (GetPlugin) returning a COM-compatible IUnknown-derived object pointer.
The Hi3Helper.Plugin.Core NuGet package contains:
- All COM interface definitions (
IPlugin,IPluginPresetConfig,IGameManager,ILauncherApiMedia,ILauncherApiNews,IPluginSelfUpdate,IGameInstaller,IGameUninstaller). - The
GameVersionstruct used for version negotiation. - Update-related types (
PluginManifest,PluginManifestAssetInfo,SelfUpdateReturnInfo,SelfUpdateReturnCode). - Utility delegates for logging, DNS resolution, and speed throttling.
Plugin Manager UI
The Plugin Manager is accessible from Collapse Launcher’s Settings page. It provides:- A list of all discovered plugins with their name, version, author, and description.
- Toggle controls to enable or disable individual plugins (takes effect on next launch).
- Uninstall controls that mark a plugin for deletion (
_markPendingDeletion) — files are removed on the next launcher start. - Update controls to manually or automatically check for and apply updates.
- A button to open the current plugin’s directory in Windows Explorer.
- An auto-update setting (
IsEnablePluginAutoUpdate) that runs update checks in the background on launch.
Plugin discovery and installation
Plugins are installed by placing a properly structured directory in the plugin folder, or by using the Plugin Manager’s import flow. The importer accepts two formats:- ZIP package
- Manifest directory
A
.zip archive whose root (or a single top-level subdirectory) contains manifest.json alongside all plugin assets. Files may be Brotli-compressed with a .br extension inside the archive.- Reads
manifest.jsonto determine the DLL name and asset list. - Creates a directory named
Hi3Helper.Plugin.<DllNameWithoutExtension>inside the plugin folder. - Copies all assets into that directory, verifying MD5 hashes for non-manifest files.
- Registers the new
PluginInfoinstance without restarting — the plugin is immediately available.
The plugin directory name is derived from
MainLibraryName in the manifest. For a DLL named MyGame.Plugin.dll, the directory will be Hi3Helper.Plugin.MyGame.Plugin.