{"id":13661625,"url":"https://github.com/modio/modio-unity-legacy","last_synced_at":"2025-04-25T03:30:41.821Z","repository":{"id":38362198,"uuid":"106215967","full_name":"modio/modio-unity-legacy","owner":"modio","description":"Unity Plugin for integrating mod.io - a modding API for game developers","archived":true,"fork":false,"pushed_at":"2022-09-14T12:59:42.000Z","size":10737,"stargazers_count":66,"open_issues_count":8,"forks_count":16,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-11-10T16:45:37.499Z","etag":null,"topics":["api","engine","mod","modding","plugin","sdk","unity"],"latest_commit_sha":null,"homepage":"https://mod.io","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/modio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-08T23:01:49.000Z","updated_at":"2024-10-05T22:20:53.000Z","dependencies_parsed_at":"2022-08-24T06:30:21.151Z","dependency_job_id":null,"html_url":"https://github.com/modio/modio-unity-legacy","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modio%2Fmodio-unity-legacy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modio%2Fmodio-unity-legacy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modio%2Fmodio-unity-legacy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modio%2Fmodio-unity-legacy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modio","download_url":"https://codeload.github.com/modio/modio-unity-legacy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250747656,"owners_count":21480687,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","engine","mod","modding","plugin","sdk","unity"],"created_at":"2024-08-02T05:01:38.205Z","updated_at":"2025-04-25T03:30:38.582Z","avatar_url":"https://github.com/modio.png","language":"C#","funding_links":[],"categories":["C\\#"],"sub_categories":[],"readme":"## NOTE: This codebase is now deprecated.\nThe latest version of the mod.io Unreal Plugin can be found at https://github.com/modio/modio-unity.\n\n\u003ca href=\"https://mod.io\"\u003e\u003cimg src=\"https://mod.io/images/branding/modio-logo-bluedark.svg\" alt=\"mod.io\" width=\"360\" align=\"right\"/\u003e\u003c/a\u003e\n# Legacy mod.io Unity Plugin\n\n[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/modio/modio-unity/blob/master/LICENSE)\n[![Discord](https://img.shields.io/discord/389039439487434752.svg?label=Discord\u0026logo=discord\u0026color=7289DA\u0026labelColor=2C2F33)](https://discord.mod.io)\n[![Master docs](https://img.shields.io/badge/docs-master-green.svg)](https://github.com/modio/modio-unity/wiki)\n[![Unity 3D](https://img.shields.io/badge/Unity-2017.3+-lightgrey.svg)](https://unity3d.com)\n\nWelcome to [mod.io](https://mod.io) Unity Plugin. It allows game developers to easily control the browsing and installation of User-Generated Content in UGC-supported games. The C# interface built on the Unity Engine provides an easy way of connecting to the [mod.io API](https://docs.mod.io). We have a [test environment](https://test.mod.io) available which offers developers a private sandbox to try the Unity Plugin out.\n\n\u003cp align=\"center\"\u003e\u003ca href=\"https://assetstore.unity.com/packages/templates/systems/mod-browser-manager-138866\"\u003e\u003cimg src=\"https://cdn-images-1.medium.com/max/1600/1*eopj1hgjlJJZ8Q9l8dNVBA.png\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n## Features\n* Platform agnostic (support 1 click mod installs on Steam, Epic Games Store, Discord, GOG, itch.io and even consoles in the future)\n* Clientless (it has no other dependencies and works behind the scenes in your game)\n* Ready-to-go, fully functional and customizable mod browsing UI\n* C# interface built on the Unity Engine for connecting to the [mod.io API](https://docs.mod.io)\n* Powerful search, filtering and tagging of mods\n* Player preference and accounty management\n\n## Installation\nRequires **Unity 2017.3** or later. Tested on Windows, and MacOS.\n\n### Asset Store or .unitypackage\nImport a package from the [Asset Store](https://assetstore.unity.com/packages/templates/systems/mod-browser-manager-138866)\nor the [Releases page](https://github.com/modio/modio-unity/releases).\nIf you have any previous versions of the plugin installed, it is highly recommended to delete them before importing a newer version.\n\nAlternatively, you can download an archive of the code using GitHub's download feature and place it in the Assets/Plugins directory within your Unity project.\n\n## Getting started\n\n1. Implement support for user-generated content in your project. Maps, skins, or game modes are often a good place to start.\n1. 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.\n1. Add the plugin to your game using the installation instructions above.\n1. Drop the ModBrowser prefab into your menu scene, or adapt the Example Scene for your purposes.\n1. Input your ID and API key by selecting \"Plugin Settings\" on the ModBrowser component inspector, or under the Tools/mod.io/Edit Settings menu item\n1. In your code, make a call to `ModManager.QueryInstalledModDirectories()` to get a list of mod data your player has installed (read our wiki for [detailed instructions](https://github.com/modio/modio-unity/wiki))\n1. Setup complete! Join us [on Discord](https://discord.mod.io) if you have questions or need help.\n\nAll mods [submitted to mod.io](https://mod.io/mods/add) will be automatically fetched and managed by the plugin, and are instantly downloadable and testable.\n\n## Usage\n### Browse Mods\n```java\n// -- Get as many mods as possible (unfiltered) --\nAPIClient.GetAllMods(RequestFilter.None,\n                     null,\n                     (r) =\u003e OnModsReceived(r.items),\n                     (e) =\u003e OnError(e));\n\n\n// -- Get a specified subset of filtered mods --\nRequestFilter filter = new RequestFilter();\nfilter.sortFieldName = API.GetAllModsFilterFields.dateLive;\nfilter.isSortAscending = false;\nfilter.fieldFilters[API.GetAllModsFilterFields.name]\n\t= new StringLikeFilter() { likeValue = \"mod\" };\n\nAPIPaginationParameters pagination = new APIPaginationParameters()\n{\n\toffset = 20,\n\tlimit = 10,\n};\n\nAPIClient.GetAllMods(filter\n                     pagination\n                     (r) =\u003e OnModsReceived(r.items),\n                     (e) =\u003e OnError(e));\n```\n\n### User Authentication\n```java\n// -- Authenticate using external service using wrapper functions --\nAPIClient.GetTermsOfUse(UserPortal.GOG,\n                        (termsInfo) =\u003e DisplayTermsOfUse(termsInfo),\n                        (e) =\u003e OnError(e));\n\nbool hasUserConsentedToTermsOfUse = true;\n\nUserAccountManagement.AuthenticateWithGOGEncryptedAppTicket(ticketData, ticketSize,\n                                                            hasUserConsentedToTermsOfUse,\n                                                            (userProfile) =\u003e OnUserAuthenticated(userProfile),\n                                                            (e) =\u003e OnError(e));\n\n\n\n// -- Authenticate via email-flow manually using APIClient --\nAPIClient.SendSecurityCode(\"player@email_address.com\",\n                           (message) =\u003e OnSecurityCodeSent(),\n                           (e) =\u003e OnError(e));\n\nAPIClient.GetOAuthToken(securityCodeFromEmail,\n                        (token) =\u003e OnTokenReceived(token),\n                        (e) =\u003e OnError(e));\n\nLocalUser.instance = new LocalUser();\nLocalUser.OAuthToken = receivedOAuthToken;\n\nAPIClient.GetAuthenticatedUser((userProfile) =\u003e OnProfileReceived(userProfile),\n                               (e) =\u003e OnError(e));\n\nLocalUser.Profile = userProfile;\nLocalUser.Save();\n```\n\n### Manage Subscriptions\n```java\n// -- Sub/Unsubscribe --\nUserAccountManagement.SubscribedToMod(modId);\nUserAccountManagement.UnsubscribeFromMod(modId);\n\n// -- Fetch and Store ---\nAPIClient.GetUserSubscriptions(RequestFilter.None,\n                               null,\n                               (subscribedMods) =\u003e OnSubscriptionsReceived(subscribedMods),\n                               (e) =\u003e OnError(e));\n\nint[] modIds = Utility.MapProfileIds(subscribedMods);\nLocalUser.SubscribedModIds = new List\u003cint\u003e(modIds);\n\n// -- Download, Update, and Install Subscribed Mods --\nactiveSceneComponent.StartCoroutine(ModManager.DownloadAndUpdateMods_Coroutine(modIds,\n                                                                               () =\u003e OnCompleted()));\n```\n\n### Submit Mods\n```java\n// -- Changes to a Mod Profile --\nEditableModProfile modEdits = EditableModProfile.CreateFromProfile(existingModProfile);\nmodEdits.name.value = \"Updated Mod Name\";\nmodEdits.name.isDirty = true;\nmodEdits.tags.value = new string[] { \"campaign\" };\nmodEdits.tags.isDirty = true;\n\nModManager.SubmitModChanges(modId,\n                            modEdits,\n                            (updatedProfile) =\u003e OnChangesSubmitted(updatedProfile),\n                            (e) =\u003e OnError(e));\n\n// -- Upload a new build --\nEditableModfile modBuildInformation = new EditableModfile();\nmodBuildInformation.version.value = \"1.2.0\";\nmodBuildInformation.version.isDirty = true;\nmodBuildInformation.version.changelog = \"Changes were made!\";\nmodBuildInformation.version.isDirty = true;\nmodBuildInformation.version.metadatBlob = \"Some game-specific metadata\";\nmodBuildInformation.version.isDirty = true;\n\nModManager.UploadModBinaryDirectory(modId,\n                                    modBuildInformation,\n                                    true, // set as the current build\n                                    (modfile) =\u003e OnUploaded(modfile),\n                                    (e) =\u003e OnError(e));\n```\n\n## Dependencies\nThe [mod.io](https://mod.io) Unity Plugin requires the functionality of two other open-source Unity plugins to run. These are included as libraries in the UnityPackage in the `Plugins` directory, or in the repository under `third_party`:\n* Json.Net for improved Json serialization. ([GitHub Repo](https://github.com/SaladLab/Json.Net.Unity3D) || [Unity Asset Store Page](https://assetstore.unity.com/packages/tools/input-management/json-net-for-unity-11347))\n* DotNetZip for Unity to zip and unzip transmitted files. ([GitHub Repo](https://github.com/r2d2rigo/dotnetzip-for-unity))\n\n## Benefits\nmod.io offers the same core functionality as Steamworks Workshop (1 click mod installs in-game), plus mod hosting, moderation and all of the critical pieces needed. Where we differ is our approach to modding and the flexibility a REST API offers. For example: \n\n* Our API is not dependent on a client or SDK, allowing you to run mod.io in many places such as your homepage and launchers\n* Designing a good mod browsing UI is hard, our plugin ships with a UI built in to save you a lot of effort and help your mods stand out\n* We don’t apply rules globally, so if you want to enable patronage, sales or other experimental features, reach out to discuss\n* Our platform is built by the super experienced ModDB.com team and is continually improving for your benefit\n* Your community can consume the mod.io API to build modding fan sites or discord bots if they want\n* Communicate and interact with your players, using our built-in emailer\n\n## Large studios and Publishers\nA 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:developers@mod.io?subject=Whitelabel) to discuss.\n\n## Contributions Welcome\nOur 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.\n\n## Other Repositories\nOur 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodio%2Fmodio-unity-legacy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodio%2Fmodio-unity-legacy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodio%2Fmodio-unity-legacy/lists"}