Unity v2 Plugin 0.1
mod management for Unity projects
|
Static Public Member Functions | |
static async Task< Result > | InitializeForUser (string userProfileIdentifier, ServerSettings serverSettings, BuildSettings buildSettings) |
Initializes the Plugin using the provided settings for a specified user. Loads the local state of mods installed on the system as well as relevant mods to the user. Loads the state of mods installed on the system as well as the set of mods the specified user has installed on this device. More... | |
static async Task< Result > | InitializeForUser (string userProfileIdentifier) |
Initializes the Plugin using the provided settings for a specified user. Loads the local state of mods installed on the system as well as relevant mods to the user. Loads the state of mods installed on the system as well as the set of mods the specified user has installed on this device. More... | |
static async Task | Shutdown () |
Cancels any running public operations, frees plugin resources, and invokes any pending callbacks with a cancelled result code. More... | |
static async Task< Result > | RequestAuthenticationEmail (string emailaddress) |
Sends an email with a security code to the specified Email Address. The security code is then used to Authenticate the user session using ModIOUnity.SubmitEmailSecurityCode() More... | |
static async Task< Result > | SubmitEmailSecurityCode (string securityCode) |
Attempts to Authenticate the current session by submitting a security code received by email from ModIOUnity.RequestAuthenticationEmail() More... | |
static async Task< ResultAnd< TermsOfUse > > | GetTermsOfUse () |
static async Task< Result > | AuthenticateUserViaSteam (string steamToken, [CanBeNull] string emailAddress, [CanBeNull] TermsHash? hash) |
Attempts to authenticate a user via the steam API. More... | |
static async Task< Result > | AuthenticateUserViaGOG (string gogToken, [CanBeNull] string emailAddress, [CanBeNull] TermsHash? hash) |
Attempts to authenticate a user via the GOG API. More... | |
static async Task< Result > | AuthenticateUserViaItch (string itchioToken, [CanBeNull] string emailAddress, [CanBeNull] TermsHash? hash) |
Attempts to authenticate a user via the Itch.io API. More... | |
static async Task< Result > | AuthenticateUserViaXbox (string xboxToken, [CanBeNull] string emailAddress, [CanBeNull] TermsHash? hash) |
Attempts to authenticate a user via the Xbox API. More... | |
static async Task< Result > | AuthenticateUserViaSwitch (string switchToken, [CanBeNull] string emailAddress, [CanBeNull] TermsHash? hash) |
Attempts to authenticate a user via the switch API. More... | |
static async Task< Result > | AuthenticateUserViaDiscord (string discordToken, [CanBeNull] string emailAddress, [CanBeNull] TermsHash? hash) |
Attempts to authenticate a user via the discord API. More... | |
static async Task< Result > | AuthenticateUserViaGoogle (string googleToken, [CanBeNull] string emailAddress, [CanBeNull] TermsHash? hash) |
Attempts to authenticate a user via the google API. More... | |
static async Task< Result > | AuthenticateUserViaOculus (OculusDevice oculusDevice, string nonce, long userId, string oculusToken, [CanBeNull] string emailAddress, [CanBeNull] TermsHash? hash) |
Attempts to authenticate a user via the oculus API. More... | |
static async Task< Result > | IsAuthenticated () |
Informs you if the current user session is authenticated or not. More... | |
static async Task< ResultAnd< TagCategory[]> > | GetTagCategories () |
Gets the existing tags for the current game Id that can be used when searching/filtering mods. More... | |
static async Task< ResultAnd< ModPage > > | GetMods (SearchFilter filter) |
Uses a SearchFilter to retrieve a specific Mod Page and returns the ModProfiles and total number of mods based on the Search Filter. More... | |
static async Task< ResultAnd< ModProfile > > | GetMod (ModId modId) |
Requests a single ModProfile from the mod.io server by its ModId. More... | |
static async Task< Result > | RateMod (ModId modId, ModRating rating) |
Used to submit a rating for a specified mod. More... | |
static async Task< Result > | SubscribeToMod (ModId modId) |
Adds the specified mod to the current user's subscriptions. More... | |
static async Task< Result > | UnsubscribeFromMod (ModId modId) |
Removes the specified mod from the current user's subscriptions. More... | |
static async Task< ResultAnd< UserProfile > > | GetCurrentUser () |
Gets the current user's UserProfile struct. Containing their mod.io username, user id, language, timezone and download references for their avatar. More... | |
static async Task< Result > | FetchUpdates () |
This retrieves the user's subscriptions from the mod.io server and synchronises it with our local instance of the user's subscription data. If mod management has been enabled via ModIOUnity.EnableModManagement() then it may begin to install/uninstall mods. More... | |
static async Task< ResultAnd< ModId > > | CreateModProfile (CreationToken token, ModProfileDetails modProfileDetails) |
Creates a new mod profile on the mod.io server based on the details provided from the ModProfileDetails object provided. More... | |
static async Task< Result > | EditModProfile (ModProfileDetails modprofile) |
This is used to edit or change data in an existing mod profile on the mod.io server. More... | |
static async Task< Result > | UploadModfile (ModfileDetails modfile) |
Used to upload a mod file to a mod profile on the mod.io server. A mod file is the actual archive of a mod. This method can be used to update a mod to a newer version (you can include changelog information in ModfileDetails). More... | |
static async Task< Result > | ArchiveModProfile (ModId modId) |
Removes a mod from being visible on the mod.io server. More... | |
static async Task< ResultAnd< ModProfile[]> > | GetCurrentUserCreations () |
Not implemented yet | |
static async Task< ResultAnd< Texture2D > > | DownloadTexture (DownloadReference downloadReference) |
Downloads a texture based on the specified download reference. More... | |
static async Task< Result > | Report (Report report) |
Reports a specified mod to mod.io. More... | |
Removes a mod from being visible on the mod.io server.
If you want to delete a mod permanently you can do so from a web browser.
modId | the id of the mod to delete |
|
static |
Attempts to authenticate a user via the discord API.
You will first need to get the terms of use and hash from the ModIOUnity.GetTermsOfUse() method.
steamToken | the user's steam token |
emailAddress | the user's email address |
hash | the TermsHash retrieved from ModIOUnity.GetTermsOfUse() |
|
static |
Attempts to authenticate a user via the GOG API.
You will first need to get the terms of use and hash from the ModIOUnity.GetTermsOfUse() method.
steamToken | the user's steam token |
emailAddress | the user's email address |
hash | the TermsHash retrieved from ModIOUnity.GetTermsOfUse() |
|
static |
Attempts to authenticate a user via the google API.
You will first need to get the terms of use and hash from the ModIOUnity.GetTermsOfUse() method.
steamToken | the user's steam token |
emailAddress | the user's email address |
hash | the TermsHash retrieved from ModIOUnity.GetTermsOfUse() |
|
static |
Attempts to authenticate a user via the Itch.io API.
You will first need to get the terms of use and hash from the ModIOUnity.GetTermsOfUse() method.
steamToken | the user's steam token |
emailAddress | the user's email address |
hash | the TermsHash retrieved from ModIOUnity.GetTermsOfUse() |
|
static |
Attempts to authenticate a user via the oculus API.
You will first need to get the terms of use and hash from the ModIOUnity.GetTermsOfUse() method.
steamToken | the user's steam token |
emailAddress | the user's email address |
hash | the TermsHash retrieved from ModIOUnity.GetTermsOfUse() |
|
static |
Attempts to authenticate a user via the steam API.
You will first need to get the terms of use and hash from the ModIOUnity.GetTermsOfUse() method.
steamToken | the user's steam token |
emailAddress | the user's email address |
hash | the TermsHash retrieved from ModIOUnity.GetTermsOfUse() |
|
static |
Attempts to authenticate a user via the switch API.
You will first need to get the terms of use and hash from the ModIOUnity.GetTermsOfUse() method.
steamToken | the user's steam token |
emailAddress | the user's email address |
hash | the TermsHash retrieved from ModIOUnity.GetTermsOfUse() |
|
static |
Attempts to authenticate a user via the Xbox API.
You will first need to get the terms of use and hash from the ModIOUnity.GetTermsOfUse() method.
steamToken | the user's steam token |
emailAddress | the user's email address |
hash | the TermsHash retrieved from ModIOUnity.GetTermsOfUse() |
|
static |
Creates a new mod profile on the mod.io server based on the details provided from the ModProfileDetails object provided.
Note that this will create a new profile on the server and can be viewed online through a browser.
token | the token allowing a new unique profile to be created from ModIOUnity.GenerateCreationToken() |
modProfileDetails | the mod profile details to apply to the mod profile being created |
|
static |
Downloads a texture based on the specified download reference.
You can get download references from UserProfiles and ModProfiles
downloadReference | download reference for the texture (eg UserObject.avatar_100x100) |
|
static |
This is used to edit or change data in an existing mod profile on the mod.io server.
You need to assign the ModId of the mod you want to edit inside of the ModProfileDetails object included in the parameters
modProfile | the mod profile details to apply to the mod profile being created |
|
static |
This retrieves the user's subscriptions from the mod.io server and synchronises it with our local instance of the user's subscription data. If mod management has been enabled via ModIOUnity.EnableModManagement() then it may begin to install/uninstall mods.
This requires the current session to have an authenticated user, otherwise Result.IsAuthenticationError() from the Result will equal true.
|
static |
Gets the current user's UserProfile struct. Containing their mod.io username, user id, language, timezone and download references for their avatar.
This requires the current session to have an authenticated user, otherwise Result.IsAuthenticationError() from the Result will equal true.
|
static |
Requests a single ModProfile from the mod.io server by its ModId.
If there is a specific mod that you want to retrieve from the mod.io database you can use this method to get it.
modId | the ModId of the ModProfile to get |
|
static |
Uses a SearchFilter to retrieve a specific Mod Page and returns the ModProfiles and total number of mods based on the Search Filter.
A ModPage contains a group of mods based on the pagination filters in SearchFilter. eg, if you use SearchFilter.SetPageIndex(0) and SearchFilter.SetPageSize(100) then ModPage.mods will contain mods from 1 to 100. But if you set SearchFilter.SetPageIndex(1) then it will have mods from 101 to 200, if that many exist. (note that 100 is the maximum page size).
filter | The filter to apply when searching through mods (also contains pagination parameters) |
|
static |
Gets the existing tags for the current game Id that can be used when searching/filtering mods.
Tags come in category groups, eg "Color" could be the name of the category and the tags themselves could be { "Red", "Blue", "Green" }
|
static |
This retrieves the terms of use text to be shown to the user to accept/deny before authenticating their account via a third party provider, eg steam or google.
If the operation succeeds it will also provide a TermsOfUse struct that contains a TermsHash struct which you will need to provide when calling a third party authentication method such as ModIOUnity.AuthenticateUserViaSteam()
serviceProvider | The provider you intend to use for authentication, eg steam, google etc. (You dont need to display terms of use to the user if they are authenticating via email security code) |
|
static |
Initializes the Plugin using the provided settings for a specified user. Loads the local state of mods installed on the system as well as relevant mods to the user. Loads the state of mods installed on the system as well as the set of mods the specified user has installed on this device.
userProfileIdentifier | Name of the directory to store the user's data in. |
|
static |
Initializes the Plugin using the provided settings for a specified user. Loads the local state of mods installed on the system as well as relevant mods to the user. Loads the state of mods installed on the system as well as the set of mods the specified user has installed on this device.
userProfileIdentifier | Name of the directory to store the user's data in. |
serverSettings | Data used by the plugin to connect with the mod.io service. |
buildSettings | Data used by the plugin to interact with the platform. |
|
static |
Informs you if the current user session is authenticated or not.
Used to submit a rating for a specified mod.
This can be used to change/overwrite previous ratings of the current user.
modId | the m=ModId of the mod being rated |
rating | the rating to give the mod. Allowed values include ModRating.Positive, ModRating.Negative, ModRating.None |
Reports a specified mod to mod.io.
report | the object containing all of the details of the report you are sending |
|
static |
Sends an email with a security code to the specified Email Address. The security code is then used to Authenticate the user session using ModIOUnity.SubmitEmailSecurityCode()
The operation will return a Result object. If the email is successfully sent Result.Succeeded() will equal true. If you haven't Initialized the plugin then Result.IsInitializationError() will equal true. If the string provided for the emailaddress is not .NET compliant Result.IsAuthenticationError() will equal true.
emailaddress | the Email Address to send the security code to, eg "JohnDoe@gmail.com" |
|
static |
Cancels any running public operations, frees plugin resources, and invokes any pending callbacks with a cancelled result code.
pending operations during a shutdown can be checked with Result.IsCancelled()
|
static |
Attempts to Authenticate the current session by submitting a security code received by email from ModIOUnity.RequestAuthenticationEmail()
It is intended that this function is used after ModIOUnity.RequestAuthenticationEmail() is performed successfully.
securityCode | The security code received from an authentication email |
Adds the specified mod to the current user's subscriptions.
If mod management has been enabled via ModIOUnity.EnableModManagement() then the mod will be downloaded and installed.
modId | ModId of the mod you want to subscribe to |
Removes the specified mod from the current user's subscriptions.
If mod management has been enabled via ModIOUnity.EnableModManagement() then the mod will be uninstalled at the next opportunity.
modId | ModId of the mod you want to unsubscribe from |
|
static |
Used to upload a mod file to a mod profile on the mod.io server. A mod file is the actual archive of a mod. This method can be used to update a mod to a newer version (you can include changelog information in ModfileDetails).
modfile | the mod file and details to upload |