You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Requires **Unity 2018.4** or later. Tested on Windows, and MacOS.
12
13
13
14
### Git Repository or .unitypackage
14
15
You can import the plugin directly from the [Unity Asset Store](https://assetstore.unity.com/packages/tools/integration/mod-browser-manager-by-mod-io-138866), or by downloading the package directly from the [Releases page](https://github.com/modio/modio-unity/releases). If you have any previous versions of the plugin installed, it is highly recommended to delete them before importing a newer version.
@@ -20,9 +21,9 @@ Alternatively, you can download an archive of the code using GitHub's download f
20
21
1. Set up your [game profile on mod.io](https://mod.io/games/add) (or our [private test environment](https://test.mod.io/games/add)) to get your game ID and API key.
21
22
2. Add the plugin to your project using the installation instructions above.
22
23
3. Ensure you dont have any conflicting libraries by going to Assets/Plugins/mod.io/ThirdParty to remove any libraries you may already have in your project (such as JsonNet).
23
-
4. Restart Unity to ensure it recognises the new assembly definitions.
24
+
4. Restart unity to ensure it recognises the new assembly definitions.
24
25
5. Go to Tools > mod.io > Edit Settings to locate the config file.
25
-
6. Select the config file and use the inspector to assign your game ID and API key in server settings (Make sure to deselect the config file before using playmode in the editor. A known Unity bug can cause the editor to crash in 2019-2021).
26
+
6. Select the config file and use the inspector to assign your game ID and API key in server settings (Make sure to deselect the config file before using playmode in the editor. A known unity bug can cause the editor to crash in 2019-2021).
26
27
7. Setup complete! Join us [on Discord](https://discord.mod.io) if you have any questions or need help.
27
28
28
29
## Setting up the Browser UI
@@ -40,23 +41,23 @@ In the current version of the plugin it is required that a user session is authe
40
41
41
42
42
43
## Usage
43
-
Below are a couple examples for some of the common usages of the plugin. Such as initialising, authenticating, enabling automatic downloads and installs, and getting a few mods from the mod.io server.
44
+
below are a couple examples for some of the common usages of the plugin. Such as initialising, authenticating, enabling automatic downloads and installs, and getting a few mods from the mod.io server.
44
45
45
46
All of the methods required to use the plugin can be found in ModIOUnity.cs. If you prefer using async methods over callbacks you can alternatively use ModIOUnityAsync.cs to use an async variation of the same methods.
46
47
47
-
### Initialize the plugin
48
+
### Initialise the plugin
48
49
```javascript
49
-
voidasyncExample()
50
+
asyncvoidExample()
50
51
{
51
-
Result result =awaitModIOUnityAsync.InitializeForUserAsync("ExampleUser");
52
+
Result result =awaitModIOUnityAsync.InitializeForUser("ExampleUser");
52
53
53
54
if (result.Succeeded())
54
55
{
55
-
Debug.Log("Initialized plugin");
56
+
Debug.Log("Initialised plugin");
56
57
}
57
58
else
58
59
{
59
-
Debug.Log("Failed to initialize plugin");
60
+
Debug.Log("Failed to initialise plugin");
60
61
{
61
62
}
62
63
```
@@ -96,7 +97,7 @@ void Example()
96
97
}
97
98
98
99
// The following method will get invoked whenever an event concerning mod management occurs
In the current version of the plugin it is required that a user session is authenticated in order to subscribe and download mods. You can accomplish this with an email address or through another third party service, such as Steam or Google. Below is an example of how to do this from an email address provided by the user. A security code will be sent to their email account and can be used to authenticate (The plugin will cache the session token to avoid having to re-authenticate every time they run the application).
107
108
```javascript
108
-
voidasyncRequestEmailCode()
109
+
asyncvoidRequestEmailCode()
109
110
{
110
111
Result result =awaitModIOUnityAsync.RequestAuthenticationEmail("[email protected]");
111
112
@@ -119,7 +120,7 @@ void async RequestEmailCode()
119
120
}
120
121
}
121
122
122
-
voidasyncSubmitCode(string userSecurityCode)
123
+
asyncvoidSubmitCode(string userSecurityCode)
123
124
{
124
125
Result result =awaitModIOUnityAsync.SubmitEmailSecurityCode(userSecurityCode);
// create a filter to retreive the first ten mods for your game
142
143
SearchFilter filter =newSearchFilter();
@@ -147,7 +148,7 @@ void async Example()
147
148
148
149
if (response.result.Succeeded())
149
150
{
150
-
Debug.Log("ModPage has "+response.value.mods.Length+" mods");
151
+
Debug.Log("ModPage has "+response.value.modProfiles.Length+" mods");
151
152
}
152
153
else
153
154
{
@@ -156,7 +157,7 @@ void async Example()
156
157
}
157
158
```
158
159
159
-
##Submitting mods
160
+
##Submitting mods
160
161
You can also submit mods directly from the plugin. Refer to the documentation for methods such as ModIOUnity.CreateModProfile and ModIOUnity.UploadModfile.
161
162
162
163
Users can also submit mods directly from the mod.io website by going to your game profile page. Simply create an account and upload mods directly.
@@ -180,7 +181,7 @@ mod.io offers the same core functionality as Steamworks Workshop (1 click mod in
180
181
A private white label option is available to license, if you want a fully featured mod-platform that you can control and host in-house. [Contact us](mailto:[email protected]?subject=Whitelabel) to discuss.
181
182
182
183
## Contributions Welcome
183
-
Our Unity plugin is public and open source. Game developers are welcome to utilize it directly, to add support for mods in their games, or fork it for their games customized use.
184
+
Our Unity plugin is public and open source. Game developers are welcome to utilize it directly, to add support for mods in their games, or fork it for their games customized use. Want to make changes to our plugin? Submit a pull request with your recommended changes to be reviewed.
184
185
185
186
## Other Repositories
186
187
Our aim with [mod.io](https://mod.io), is to provide an [open modding API](https://docs.mod.io). You are welcome to [view, fork and contribute to our other codebases](https://github.com/modio) in use.
0 commit comments