Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Quickstart Guide

Jackson edited this page May 1, 2019 · 2 revisions

mod.io Video Tutorial

1. Download the plugin and import it into your project

The plugin can be integrated in two main ways. The simple way is to download the Unity Package from either the Unity Asset Store or the GitHub Release Page and let Unity integrate the plugin for you. Alternatively, you can clone the GitHub repository into a folder in your project.

2. Integrate the default UI

We recommend incorporating the mod browsing directly into your existing menu system. The easiest way to do this is to copy the _ModBrowser prefab from Mod Browser/Prefabs into your scene and enable/disable the GameObject as required - the attached scripts will handle everything automatically. For an example implementation, see the Example Scene included.

3. Create a mod.io Game Profile

mod.io offers a Test Environment in addition to the Production Environment to facilitate a safe and secure development process. After deciding which environment you'll be using (see: Test Environment vs. Production Environment) follow the game profile creation wizard at test.mod.io or mod.io by entering your desired game URL into the "setup your game" field.

4. Store Game Id and API Key

The plugin uses a Scriptable Object to store the profile data for your game. This Scriptable Object can be accessed either via the mod.io/Edit Settings menu item from within the Unity Editor, or by clicking the "Plugin Settings" button in the ModBrowser component inspector. Ensure that the API URL matches the environment you created your game profile on and input the game Id and API key.

5. Collect Mods on Game Load

A call to ModIO.ModManager.GetInstalledModDirectories will return a list of directories pertaining to the mods a player has installed. As mod.io only allows zip archives as mod builds, the mod.io Unity Plugin manages mod installation by allocating each mod build a unique directory containing the contents of the zip archive. Each directory returned by this function represents all the data contained in a mod build, and is provided for manipulation and integration by your game code.

6. Done!

To develop a more in-depth understanding, consider reading the other basics guides in this wiki, as well as bookmarking the API Index for quick access to the documentation.

Clone this wiki locally