Skip to content

Getting Started

Emanuele Manzione edited this page Apr 26, 2020 · 13 revisions

Installation

Unity

Just import the package in your project into Unity Editor. After importing, your project should contain atleast these folders:

After import

To check if it is correctly installed, go on Window menu and make sure you can find the PATCH menu item.

Window

How does this updater work?

Before we dive into the software itself, a little bit of theory. I know, I know: it is boring. But it is needed. In this way you completely understand what we are going to do here.

When you develop a game or an application, you also want the ability to deploy updates and fixes for it. There are multiple ways you can deliver updates for your software, but the most intuitive one in my opinion is the classic Launcher. The Launcher is a software that is not embedded into your own application/game: it is standalone and it is started before your game. It repairs corrupted/damaged files, it checks for updates, it applies updates, then it starts your game if everything is ready.

You may also need to deploy updates for the Launcher itself: so it also needs to self-update. In this package I propose two ways of self-updating: one for Unity and one for WPF.

Scenes

The package comes with an example of a classic updating architecture. You can find sample scenes in MHLab/Patch/Launcher/Scenes:

  • Launcher. It is the scene that contains your Launcher logic and UI. It updates your game. In the hierarchy find a LauncherData game object: it contains settings for your Launcher script.
  • PreGame. It is the scene that contains your Launcher self-updating logic and UI. It updates your Launcher. You need to run it as first scene in your game. In the hierarchy find a LauncherData game object: it contains settings for your LauncherUpdater script.
  • SampleGame. It represents your game, it is just a placeholder.