Skip to content

The Launcher

Emanuele Manzione edited this page Apr 8, 2020 · 24 revisions

The Launcher is what your client will run to update the game. It requires an initial configuration in order to work.

Initialization

I will refer to the LauncherMinimal scene in MHLab/Patch/Launcher/Scenes, but the configuration is similar for other clients (WPF, WinFroms, etc).

To configure it, just find the Launcher game object: it contains a Launcher component. It should look like this:

Launcher component

Here you must set some information:

  • Remote URL: the HTTP address where you uploaded files previously
  • Launcher Executable Name: the name of your Launcher executable, with the extension. In the screenshot you can see an example related to Windows's exe.
  • Game Executable Name: the name of your game executable, with the extension.

Other settings you see in the screenshot are just for UI management.

Hint

If you need to deeper customize settings, take a look at the Launcher.cs script, in CreateSettings method. The LauncherSettings instance exposes multiple customizable settings you can tune to fit your needs.

Customization

LauncherMinimal and other scenes are just samples: you're encouraged to customize them. Also the Launcher.cs script is just a minimal sample of what you can do with the PATCH's API: feel free to edit it.

The UI can be trivially customized with the Unity UI system (or with Visual Studio if you're using the WPF version).

First launcher update

When you are satisfied of your Launcher, it's time to build it. Place built files in Updater folder in your PATCH's workspace.

Clone this wiki locally