Unity v2 Plugin 0.1
mod management for Unity projects
ModIO.ModIOUnity Class Reference

Main interface for the mod.io Unity plugin. More...

Static Public Member Functions

static bool IsInitialized ()
 You can use this to quickly identify whether or not the plugin has been initialized. More...
 
static void SetLoggingDelegate (LogMessageDelegate loggingDelegate)
 Assigns the logging delegate the plugin uses to output log messages that otherwise go to UnityEngine.Debug.Log(string) More...
 
static void InitializeForUser (string userProfileIdentifier, ServerSettings serverSettings, BuildSettings buildSettings, Action< Result > callback)
 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 void InitializeForUser (string userProfileIdentifier, Action< Result > callback)
 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 void Shutdown (Action shutdownComplete)
 Cancels any running public operations, frees plugin resources, and invokes any pending callbacks with a cancelled result code. More...
 
static void RequestAuthenticationEmail (string emailaddress, Action< Result > callback)
 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 void SubmitEmailSecurityCode (string securityCode, Action< Result > callback)
 Attempts to Authenticate the current session by submitting a security code received by email from ModIOUnity.RequestAuthenticationEmail() More...
 
static void GetTermsOfUse (Action< ResultAnd< TermsOfUse > > callback)
 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. More...
 
static void AuthenticateUserViaSteam (string steamToken, [CanBeNull] string emailAddress, [CanBeNull] TermsHash? hash, Action< Result > callback)
 Attempts to authenticate a user via the steam API. More...
 
static void AuthenticateUserViaGOG (string gogToken, [CanBeNull] string emailAddress, [CanBeNull] TermsHash? hash, Action< Result > callback)
 Attempts to authenticate a user via the GOG API. More...
 
static void AuthenticateUserViaItch (string itchioToken, [CanBeNull] string emailAddress, [CanBeNull] TermsHash? hash, Action< Result > callback)
 Attempts to authenticate a user via the Itch.io API. More...
 
static void AuthenticateUserViaXbox (string xboxToken, [CanBeNull] string emailAddress, [CanBeNull] TermsHash? hash, Action< Result > callback)
 Attempts to authenticate a user via the Xbox API. More...
 
static void AuthenticateUserViaSwitch (string switchToken, [CanBeNull] string emailAddress, [CanBeNull] TermsHash? hash, Action< Result > callback)
 Attempts to authenticate a user via the switch API. More...
 
static void AuthenticateUserViaDiscord (string discordToken, [CanBeNull] string emailAddress, [CanBeNull] TermsHash? hash, Action< Result > callback)
 Attempts to authenticate a user via the Discord API. More...
 
static void AuthenticateUserViaGoogle (string googleToken, [CanBeNull] string emailAddress, [CanBeNull] TermsHash? hash, Action< Result > callback)
 Attempts to authenticate a user via the Google API. More...
 
static void AuthenticateUserViaOculus (OculusDevice oculusDevice, string nonce, long userId, string oculusToken, [CanBeNull] string emailAddress, [CanBeNull] TermsHash? hash, Action< Result > callback)
 Attempts to authenticate a user via the Oculus API. More...
 
static void IsAuthenticated (Action< Result > callback)
 Informs you if the current user session is authenticated or not. More...
 
static Result RemoveUserData ()
 De-authenticates the current Mod.io user for the current session and clears all user-specific data stored on the current device. Installed mods that do not have other local users subscribed will be uninstalled if ModIOUnity.EnableModManagement() has been used to enable the mod management system. (If ModManagement is enabled). More...
 
static void GetTagCategories (Action< ResultAnd< TagCategory[]> > callback)
 Gets the existing tags for the current game Id that can be used when searching/filtering mods. More...
 
static void GetMods (SearchFilter filter, Action< Result, ModPage > callback)
 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 void GetMod (ModId modId, Action< ResultAnd< ModProfile > > callback)
 Requests a single ModProfile from the mod.io server by its ModId. More...
 
static void RateMod (ModId modId, ModRating rating, Action< Result > callback)
 Used to submit a rating for a specified mod. More...
 
static void SubscribeToMod (ModId modId, Action< Result > callback)
 Adds the specified mod to the current user's subscriptions. More...
 
static void UnsubscribeFromMod (ModId modId, Action< Result > callback)
 Removes the specified mod from the current user's subscriptions. More...
 
static SubscribedMod[] GetSubscribedMods (out Result result)
 Retrieves all of the subscribed mods for the current user. More...
 
static void GetCurrentUser (Action< ResultAnd< UserProfile > > callback)
 Gets the current user's UserProfile struct. Containing their mod.io username, user id, language, timezone and download references for their avatar. More...
 
static void FetchUpdates (Action< Result > callback)
 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 Result EnableModManagement ([CanBeNull] ModManagementEventDelegate modManagementEventDelegate)
 Enables the mod management system. When enabled it will automatically download, install, update and delete mods according to the authenticated user's subscriptions. More...
 
static Result DisableModManagement ()
 Disables the mod management system and cancels any ongoing jobs for downloading or installing mods. More...
 
static ProgressHandle GetCurrentModManagementOperation ()
 Returns a ProgressHandle with information on the current mod management operation. More...
 
static InstalledMod[] GetSystemInstalledMods (out Result result)
 Gets an array of mods that are installed on the current device. More...
 
static Result ForceUninstallMod (ModId modId)
 This informs the mod management system that this mod should be uninstalled if not subscribed by the current user. (such as a mod installed by a different user not currently active). More...
 
static bool IsModManagementBusy ()
 Checks if the automatic management process is currently awake and performing a mod management operation, such as installing, downloading, uninstalling, updating. More...
 
static CreationToken GenerateCreationToken ()
 Gets a token that can be used to create a new mod profile on the mod.io server. More...
 
static void CreateModProfile (CreationToken token, ModProfileDetails modProfileDetails, Action< ResultAnd< ModId > > callback)
 Creates a new mod profile on the mod.io server based on the details provided from the ModProfileDetails object provided. More...
 
static void EditModProfile (ModProfileDetails modProfile, Action< Result > callback)
 This is used to edit or change data in an existing mod profile on the mod.io server. More...
 
static ProgressHandle GetCurrentUploadHandle ()
 This will return null if no upload operation is currently being performed. More...
 
static void UploadModfile (ModfileDetails modfile, Action< Result > callback)
 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 void UploadModMedia (ModProfileDetails modfileDetails, Action< Result > callback)
 
static void ArchiveModProfile (ModId modId, Action< Result > callback)
 Removes a mod from being visible on the mod.io server. More...
 
static void GetCurrentUserCreations (Action< ResultAnd< ModProfile[]> > callback)
 Not implemented yet
 
static void DownloadTexture (DownloadReference downloadReference, Action< ResultAnd< Texture2D > > callback)
 Downloads a texture based on the specified download reference. More...
 
static void Report (Report report, Action< Result > callback)
 Reports a specified mod to mod.io. More...
 

Detailed Description

Main interface for the mod.io Unity plugin.

Member Function Documentation

◆ ArchiveModProfile()

static void ModIO.ModIOUnity.ArchiveModProfile ( ModId  modId,
Action< Result callback 
)
static

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.

Parameters
modIdthe id of the mod to delete
callbackcallback with the result of the operation
See also
Result, CreateModProfile, EditModProfile, ModIOUnityAsync.ArchiveModProfile
ModId modId;
void Example()
{
ModIOUnity.ArchiveModProfile(modId, ArchiveModCallback);
}
void ArchiveModCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("archived mod profile");
}
else
{
Debug.Log("failed to archive mod profile");
}
}

◆ AuthenticateUserViaDiscord()

static void ModIO.ModIOUnity.AuthenticateUserViaDiscord ( string  discordToken,
[CanBeNull] string  emailAddress,
[CanBeNull] TermsHash hash,
Action< Result callback 
)
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.

Parameters
steamTokenthe user's steam token
emailAddressthe user's email address
hashthe TermsHash retrieved from ModIOUnity.GetTermsOfUse()
callbackCallback to be invoked when the operation completes
See also
GetTermsOfUse, ModIOUnityAsync.AuthenticateUserViaDiscord
// First we get the Terms of Use to display to the user and cache the hash
void GetTermsOfUse_Example()
{
ModIOUnity.GetTermsOfUse(GetTermsOfUseCallback);
}
void GetTermsOfUseCallback(ResultAnd&#60;TermsOfUse&#62; response)
{
if (response.result.Succeeded())
{
Debug.Log("Successfully retrieved the terms of use: " + response.value.termsOfUse);
// Cache the terms of use (which has the hash for when we attempt to authenticate)
modIOTermsOfUse = response.value;
}
else
{
Debug.Log("Failed to retrieve the terms of use");
}
}
// Once we have the Terms of Use and hash we can attempt to authenticate
void Authenticate_Example()
{
ModIOUnity.AuthenticateUserViaDiscord(discordToken, "johndoe@gmail.com", modIOTermsOfUse.hash, AuthenticationCallback);
}
void AuthenticationCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("Successfully authenticated user");
}
else
{
Debug.Log("Failed to authenticate");
}
}

◆ AuthenticateUserViaGOG()

static void ModIO.ModIOUnity.AuthenticateUserViaGOG ( string  gogToken,
[CanBeNull] string  emailAddress,
[CanBeNull] TermsHash hash,
Action< Result callback 
)
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.

Parameters
steamTokenthe user's steam token
emailAddressthe user's email address
hashthe TermsHash retrieved from ModIOUnity.GetTermsOfUse()
callbackCallback to be invoked when the operation completes
See also
GetTermsOfUse, ModIOUnityAsync.AuthenticateUserViaGOG
// First we get the Terms of Use to display to the user and cache the hash
void GetTermsOfUse_Example()
{
ModIOUnity.GetTermsOfUse(GetTermsOfUseCallback);
}
void GetTermsOfUseCallback(ResultAnd&#60;TermsOfUse&#62; response)
{
if (response.result.Succeeded())
{
Debug.Log("Successfully retrieved the terms of use: " + response.value.termsOfUse);
// Cache the terms of use (which has the hash for when we attempt to authenticate)
modIOTermsOfUse = response.value;
}
else
{
Debug.Log("Failed to retrieve the terms of use");
}
}
// Once we have the Terms of Use and hash we can attempt to authenticate
void Authenticate_Example()
{
ModIOUnity.AuthenticateUserViaGOG(gogToken, "johndoe@gmail.com", modIOTermsOfUse.hash, AuthenticationCallback);
}
void AuthenticationCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("Successfully authenticated user");
}
else
{
Debug.Log("Failed to authenticate");
}
}

◆ AuthenticateUserViaGoogle()

static void ModIO.ModIOUnity.AuthenticateUserViaGoogle ( string  googleToken,
[CanBeNull] string  emailAddress,
[CanBeNull] TermsHash hash,
Action< Result callback 
)
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.

Parameters
steamTokenthe user's steam token
emailAddressthe user's email address
hashthe TermsHash retrieved from ModIOUnity.GetTermsOfUse()
callbackCallback to be invoked when the operation completes
See also
GetTermsOfUse, ModIOUnityAsync.AuthenticateUserViaGoogle
// First we get the Terms of Use to display to the user and cache the hash
void GetTermsOfUse_Example()
{
ModIOUnity.GetTermsOfUse(GetTermsOfUseCallback);
}
void GetTermsOfUseCallback(ResultAnd&#60;TermsOfUse&#62; response)
{
if (response.result.Succeeded())
{
Debug.Log("Successfully retrieved the terms of use: " + response.value.termsOfUse);
// Cache the terms of use (which has the hash for when we attempt to authenticate)
modIOTermsOfUse = response.value;
}
else
{
Debug.Log("Failed to retrieve the terms of use");
}
}
// Once we have the Terms of Use and hash we can attempt to authenticate
void Authenticate_Example()
{
ModIOUnity.AuthenticateUserViaGoogle(googleToken, "johndoe@gmail.com", modIOTermsOfUse.hash, AuthenticationCallback);
}
void AuthenticationCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("Successfully authenticated user");
}
else
{
Debug.Log("Failed to authenticate");
}
}

◆ AuthenticateUserViaItch()

static void ModIO.ModIOUnity.AuthenticateUserViaItch ( string  itchioToken,
[CanBeNull] string  emailAddress,
[CanBeNull] TermsHash hash,
Action< Result callback 
)
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.

Parameters
steamTokenthe user's steam token
emailAddressthe user's email address
hashthe TermsHash retrieved from ModIOUnity.GetTermsOfUse()
callbackCallback to be invoked when the operation completes
See also
GetTermsOfUse, ModIOUnityAsync.AuthenticateUserViaItch
// First we get the Terms of Use to display to the user and cache the hash
void GetTermsOfUse_Example()
{
ModIOUnity.GetTermsOfUse(GetTermsOfUseCallback);
}
void GetTermsOfUseCallback(ResultAnd&#60;TermsOfUse&#62; response)
{
if (response.result.Succeeded())
{
Debug.Log("Successfully retrieved the terms of use: " + response.value.termsOfUse);
// Cache the terms of use (which has the hash for when we attempt to authenticate)
modIOTermsOfUse = response.value;
}
else
{
Debug.Log("Failed to retrieve the terms of use");
}
}
// Once we have the Terms of Use and hash we can attempt to authenticate
void Authenticate_Example()
{
ModIOUnity.AuthenticateUserViaItch(itchioToken, "johndoe@gmail.com", modIOTermsOfUse.hash, AuthenticationCallback);
}
void AuthenticationCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("Successfully authenticated user");
}
else
{
Debug.Log("Failed to authenticate");
}
}

◆ AuthenticateUserViaOculus()

static void ModIO.ModIOUnity.AuthenticateUserViaOculus ( OculusDevice  oculusDevice,
string  nonce,
long  userId,
string  oculusToken,
[CanBeNull] string  emailAddress,
[CanBeNull] TermsHash hash,
Action< Result callback 
)
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.

Parameters
steamTokenthe user's steam token
emailAddressthe user's email address
hashthe TermsHash retrieved from ModIOUnity.GetTermsOfUse()
callbackCallback to be invoked when the operation completes
See also
GetTermsOfUse, ModIOUnityAsync.AuthenticateUserViaOculus
// First we get the Terms of Use to display to the user and cache the hash
void GetTermsOfUse_Example()
{
ModIOUnity.GetTermsOfUse(GetTermsOfUseCallback);
}
void GetTermsOfUseCallback(ResultAnd&#60;TermsOfUse&#62; response)
{
if (response.result.Succeeded())
{
Debug.Log("Successfully retrieved the terms of use: " + response.value.termsOfUse);
// Cache the terms of use (which has the hash for when we attempt to authenticate)
modIOTermsOfUse = response.value;
}
else
{
Debug.Log("Failed to retrieve the terms of use");
}
}
// Once we have the Terms of Use and hash we can attempt to authenticate
void Authenticate_Example()
{
ModIOUnity.AuthenticateUserViaOculus(oculusDevice.Quest,
nonce,
userId,
oculusToken,
"johndoe@gmail.com",
modIOTermsOfUse.hash, AuthenticationCallback);
}
void AuthenticationCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("Successfully authenticated user");
}
else
{
Debug.Log("Failed to authenticate");
}
}

◆ AuthenticateUserViaSteam()

static void ModIO.ModIOUnity.AuthenticateUserViaSteam ( string  steamToken,
[CanBeNull] string  emailAddress,
[CanBeNull] TermsHash hash,
Action< Result callback 
)
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.

Parameters
steamTokenthe user's steam token
emailAddressthe user's email address
hashthe TermsHash retrieved from ModIOUnity.GetTermsOfUse()
callbackCallback to be invoked when the operation completes
See also
GetTermsOfUse, ModIOUnityAsync.AuthenticateUserViaSteam
// First we get the Terms of Use to display to the user and cache the hash
void GetTermsOfUse_Example()
{
ModIOUnity.GetTermsOfUse(GetTermsOfUseCallback);
}
void GetTermsOfUseCallback(ResultAnd&#60;TermsOfUse&#62; response)
{
if (response.result.Succeeded())
{
Debug.Log("Successfully retrieved the terms of use: " + response.value.termsOfUse);
// Cache the terms of use (which has the hash for when we attempt to authenticate)
modIOTermsOfUse = response.value;
}
else
{
Debug.Log("Failed to retrieve the terms of use");
}
}
// Once we have the Terms of Use and hash we can attempt to authenticate
void Authenticate_Example()
{
ModIOUnity.AuthenticateUserViaSteam(steamToken, "johndoe@gmail.com", modIOTermsOfUse.hash, AuthenticationCallback);
}
void AuthenticationCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("Successfully authenticated user");
}
else
{
Debug.Log("Failed to authenticate");
}
}

◆ AuthenticateUserViaSwitch()

static void ModIO.ModIOUnity.AuthenticateUserViaSwitch ( string  switchToken,
[CanBeNull] string  emailAddress,
[CanBeNull] TermsHash hash,
Action< Result callback 
)
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.

Parameters
steamTokenthe user's steam token
emailAddressthe user's email address
hashthe TermsHash retrieved from ModIOUnity.GetTermsOfUse()
callbackCallback to be invoked when the operation completes
See also
GetTermsOfUse, ModIOUnityAsync.AuthenticateUserViaSwitch
// First we get the Terms of Use to display to the user and cache the hash
void GetTermsOfUse_Example()
{
ModIOUnity.GetTermsOfUse(GetTermsOfUseCallback);
}
void GetTermsOfUseCallback(ResultAnd&#60;TermsOfUse&#62; response)
{
if (response.result.Succeeded())
{
Debug.Log("Successfully retrieved the terms of use: " + response.value.termsOfUse);
// Cache the terms of use (which has the hash for when we attempt to authenticate)
modIOTermsOfUse = response.value;
}
else
{
Debug.Log("Failed to retrieve the terms of use");
}
}
// Once we have the Terms of Use and hash we can attempt to authenticate
void Authenticate_Example()
{
ModIOUnity.AuthenticateUserViaSwitch(switchToken, "johndoe@gmail.com", modIOTermsOfUse.hash, AuthenticationCallback);
}
void AuthenticationCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("Successfully authenticated user");
}
else
{
Debug.Log("Failed to authenticate");
}
}

◆ AuthenticateUserViaXbox()

static void ModIO.ModIOUnity.AuthenticateUserViaXbox ( string  xboxToken,
[CanBeNull] string  emailAddress,
[CanBeNull] TermsHash hash,
Action< Result callback 
)
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.

Parameters
steamTokenthe user's steam token
emailAddressthe user's email address
hashthe TermsHash retrieved from ModIOUnity.GetTermsOfUse()
callbackCallback to be invoked when the operation completes
See also
GetTermsOfUse, ModIOUnityAsync.AuthenticateUserViaXbox
// First we get the Terms of Use to display to the user and cache the hash
void GetTermsOfUse_Example()
{
ModIOUnity.GetTermsOfUse(GetTermsOfUseCallback);
}
void GetTermsOfUseCallback(ResultAnd&#60;TermsOfUse&#62; response)
{
if (response.result.Succeeded())
{
Debug.Log("Successfully retrieved the terms of use: " + response.value.termsOfUse);
// Cache the terms of use (which has the hash for when we attempt to authenticate)
modIOTermsOfUse = response.value;
}
else
{
Debug.Log("Failed to retrieve the terms of use");
}
}
// Once we have the Terms of Use and hash we can attempt to authenticate
void Authenticate_Example()
{
ModIOUnity.AuthenticateUserViaXbox(xboxToken, "johndoe@gmail.com", modIOTermsOfUse.hash, AuthenticationCallback);
}
void AuthenticationCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("Successfully authenticated user");
}
else
{
Debug.Log("Failed to authenticate");
}
}

◆ CreateModProfile()

static void ModIO.ModIOUnity.CreateModProfile ( CreationToken  token,
ModProfileDetails  modProfileDetails,
Action< ResultAnd< ModId > >  callback 
)
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.

Parameters
tokenthe token allowing a new unique profile to be created from ModIOUnity.GenerateCreationToken()
modProfileDetailsthe mod profile details to apply to the mod profile being created
callbacka callback with the Result of the operation and the ModId of the newly created mod profile (if successful)
See also
GenerateCreationToken, CreationToken, ModProfileDetails, Result, ModId, ModIOUnityAsync.CreateModProfile
ModId newMod;
CreationToken token;
void Example()
{
token = ModIOUnity.GenerateCreationToken();
ModProfileDetails profile = new ModProfileDetails();
profile.name = "mod name";
profile.summary = "a brief summary about this mod being submitted"
ModIOUnity.CreateModProfile(token, profile, CreateProfileCallback);
}
void CreateProfileCallback(ResultAnd&#60;ModId&#62; response)
{
if (response.result.Succeeded())
{
newMod = response.value;
Debug.Log("created new mod profile with id " + response.value.ToString());
}
else
{
Debug.Log("failed to create new mod profile");
}
}

◆ DisableModManagement()

static Result ModIO.ModIOUnity.DisableModManagement ( )
static

Disables the mod management system and cancels any ongoing jobs for downloading or installing mods.

void Example() { Result result = ModIOUnity.DisableModManagement();

if (result.Succeeded()) { Debug.Log("disabled mod management"); } else { Debug.Log("failed to disable mod management"); } }

◆ DownloadTexture()

static void ModIO.ModIOUnity.DownloadTexture ( DownloadReference  downloadReference,
Action< ResultAnd< Texture2D > >  callback 
)
static

Downloads a texture based on the specified download reference.

You can get download references from UserProfiles and ModProfiles

Parameters
downloadReferencedownload reference for the texture (eg UserObject.avatar_100x100)
callbackcallback with the Result and Texture2D from the download
See also
Result, DownloadReference, Texture2D, ModIOUnityAsync.DownloadTexture
ModProfile mod;
void Example()
{
ModIOUnity.DownloadTexture(mod.logoImage_320x180, DownloadTextureCallback);
}
void DownloadTextureCallback(ResultAnd&#60;Texture2D&#62; response)
{
if (response.result.Succeeded())
{
Debug.Log("downloaded the mod logo texture");
}
else
{
Debug.Log("failed to download the mod logo texture");
}
}

◆ EditModProfile()

static void ModIO.ModIOUnity.EditModProfile ( ModProfileDetails  modProfile,
Action< Result callback 
)
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

Parameters
modProfilethe mod profile details to apply to the mod profile being created
callbacka callback with the Result of the operation and the ModId of the newly created mod profile (if successful)
See also
ModProfileDetails, Result, ModIOUnityAsync.EditModProfile
ModId modId;
void Example()
{
ModProfileDetails profile = new ModProfileDetails();
profile.id = modId;
profile.summary = "a new brief summary about this mod being edited"
ModIOUnity.EditModProfile(profile, EditProfileCallback);
}
void EditProfileCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("edited mod profile");
}
else
{
Debug.Log("failed to edit mod profile");
}
}

◆ EnableModManagement()

static Result ModIO.ModIOUnity.EnableModManagement ( [CanBeNull] ModManagementEventDelegate  modManagementEventDelegate)
static

Enables the mod management system. When enabled it will automatically download, install, update and delete mods according to the authenticated user's subscriptions.

This requires the current session to have an authenticated user, otherwise Result.IsAuthenticationError() from the Result will equal true.

Parameters
modManagementEventDelegateA delegate that gets called everytime the ModManagement system runs an event (can be null)
Returns
A Result for whether or not mod management was enabled
See also
Result, DisableModManagement, IsAuthenticated
void Example()
{
Result result = ModIOUnity.EnableModManagement(ModManagementDelegate);
}
void ModManagementDelegate(ModManagementEventType eventType, ModId modId)
{
Debug.Log("a mod management event of type " + eventType.ToString() + " has been invoked");
}

◆ FetchUpdates()

static void ModIO.ModIOUnity.FetchUpdates ( Action< Result callback)
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.

Parameters
callbackcallback with the Result of the operation
See also
Result, EnableModManagement(ModIO.ModManagementEventDelegate), IsAuthenticated, RequestAuthenticationEmail, SubmitEmailSecurityCode, AuthenticateUserViaDiscord, AuthenticateUserViaGoogle, AuthenticateUserViaGOG, AuthenticateUserViaItch, AuthenticateUserViaOculus, AuthenticateUserViaSteam, AuthenticateUserViaSwitch, AuthenticateUserViaXbox, ModIOUnityAsync.FetchUpdates
void Example()
{
ModIOUnity.FetchUpdates(FetchUpdatesCallback);
}
void FetchUpdatesCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("updated user subscriptions");
}
else
{
Debug.Log("failed to get user subscriptions");
}
}

◆ ForceUninstallMod()

static Result ModIO.ModIOUnity.ForceUninstallMod ( ModId  modId)
static

This informs the mod management system that this mod should be uninstalled if not subscribed by the current user. (such as a mod installed by a different user not currently active).

Normally if you wish to uninstall a mod you should unsubscribe and use ModIOUnity.EnableModManagement() and the process will be handled automatically. However, if you want to uninstall a mod that is subscribed to a different user session this method will mark the mod to be uninstalled to free up disk space. Alternatively you can use ModIOUnity.RemoveUserData() to remove a user from the local registry. If no other users are subscribed to the same mod it will be uninstalled automatically.

Parameters
modIdThe ModId of the mod to uninstall
See also
Result, SubscribeToMod, UnsubscribeFromMod, EnableModManagement, RemoveUserData
ModProfile mod;
void Example()
{
Result result = ModIOUnity.ForceUninstallMod(mod.id);
if (result.Succeeded())
{
Debug.Log("mod marked for uninstall");
}
else
{
Debug.Log("failed to mark mod for uninstall");
}
}

◆ GenerateCreationToken()

static CreationToken ModIO.ModIOUnity.GenerateCreationToken ( )
static

Gets a token that can be used to create a new mod profile on the mod.io server.

Returns
a CreationToken used in ModIOUnity.CreateModProfile()
See also
CreationToken, ModProfileDetails, Result, ModId, CreateModProfile, EditModProfile
void Example()
{
CreationToken token = ModIOUnity.GenerateCreationToken();
}

◆ GetCurrentModManagementOperation()

static ProgressHandle ModIO.ModIOUnity.GetCurrentModManagementOperation ( )
static

Returns a ProgressHandle with information on the current mod management operation.

Returns
Optional ProgressHandle object containing information regarding the progress of the operation. Null if no operation is running
See also
ProgressHandle, EnableModManagement
void Example()
{
ProgressHandle handle = ModIOUnity.GetCurrentModManagementOperation();
if (handle != null)
{
Debug.Log("current mod management operation is " + handle.OperationType.ToString());
}
else
{
Debug.Log("no current mod management operation");
}
}

◆ GetCurrentUploadHandle()

static ProgressHandle ModIO.ModIOUnity.GetCurrentUploadHandle ( )
static

This will return null if no upload operation is currently being performed.

Uploads are not handled by the mod management system, these are handled separately.

Returns
A ProgressHandle informing the upload state and progress. Null if no upload operation is running.
See also
UploadModfile, ArchiveModProfile
void Example()
{
ProgressHandle handle = ModIOUnity.GetCurrentUploadHandle();
if (handle != null)
{
Debug.Log("Current upload progress is: " + handle.Progress.ToString());
}
}

◆ GetCurrentUser()

static void ModIO.ModIOUnity.GetCurrentUser ( Action< ResultAnd< UserProfile > >  callback)
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.

Parameters
callbackcallback with the Result and the UserProfile
See also
Result, UserProfile, IsAuthenticated, ModIOUnityAsync.GetCurrentUser
void Example()
{
ModIOUnity.GetCurrentUser(GetUserCallback);
}
void GetUserCallback(ResultAnd&#60;UserProfile&#62; response)
{
if (response.result.Succeeded())
{
Debug.Log("Got user: " + response.value.username);
}
else
{
Debug.Log("failed to get user");
}
}

◆ GetMod()

static void ModIO.ModIOUnity.GetMod ( ModId  modId,
Action< ResultAnd< ModProfile > >  callback 
)
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.

Parameters
modIdthe ModId of the ModProfile to get
callbackcallback with the Result and ModProfile
See also
ModId, ModProfile, Result, ModIOUnityAsync.GetMod
void Example()
{
ModId modId = new ModId(1234);
ModIOUnity.GetMod(modId, GetModCallback);
}
void GetModCallback(ResultAnd&#60;ModProfile&#62; response)
{
if (response.result.Succeeded())
{
Debug.Log("retrieved mod " + response.value.name);
}
else
{
Debug.Log("failed to get mod");
}
}

◆ GetMods()

static void ModIO.ModIOUnity.GetMods ( SearchFilter  filter,
Action< Result, ModPage callback 
)
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).

Parameters
filterThe filter to apply when searching through mods (also contains pagination parameters)
callbackcallback invoked with the Result and ModPage
See also
SearchFilter, ModPage, Result, ModIOUnityAsync.GetMods
void Example()
{
SearchFilter filter = new SearchFilter();
filter.SetPageIndex(0);
filter.SetPageSize(10);
ModIOUnity.GetMods(filter, GetModsCallback);
}
void GetModsCallback(Result result, ModPage modPage)
{
if (result.Succeeded())
{
Debug.Log("ModPage has " + modPage.mods.Length + " mods");
}
else
{
Debug.Log("failed to get mods");
}
}

◆ GetSubscribedMods()

static SubscribedMod[] ModIO.ModIOUnity.GetSubscribedMods ( out Result  result)
static

Retrieves all of the subscribed mods for the current user.

Note that these are not installed mods only mods the user has opted as 'subscribed'. Also, ensure you have called ModIOUnity.FetchUpdates() at least once during this session in order to have an accurate collection of the user's subscriptions.

Parameters
resultan out parameter for whether or not the method succeeded
See also
Result, SubscribedMod, FetchUpdates
Returns
an array of the user's subscribed mods
void Example()
{
SubscribedMod[] mods = ModIOUnity.GetSubscribedMods(out Result result);
if (result.Succeeded())
{
Debug.Log("use has " + mods.Length + " subscribed mods");
}
else
{
Debug.Log("failed to get user mods");
}
}

◆ GetSystemInstalledMods()

static InstalledMod[] ModIO.ModIOUnity.GetSystemInstalledMods ( out Result  result)
static

Gets an array of mods that are installed on the current device.

Note that these may not all be subscribed by the current user. If you wish to get all of the current user's installed mods use ModIOUnity.GetSubscribedMods() and check the SubscribedMod.status equals SubscribedModStatus.Installed.

Parameters
resultan out Result to inform whether or not it was able to get installed mods
See also
InstalledMod, GetSubscribedMods
Returns
an array of InstalledMod for each existing mod installed on the current device
void Example()
{
InstalledMod[] mods = ModIOUnity.GetSystemInstalledMods(out Result result);
if (result.Succeeded())
{
Debug.Log("found " + mods.Length.ToString() + " mods installed");
}
else
{
Debug.Log("failed to get installed mods");
}
}

◆ GetTagCategories()

static void ModIO.ModIOUnity.GetTagCategories ( Action< ResultAnd< TagCategory[]> >  callback)
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" }

Parameters
callbackthe callback with the result and tags retrieved
See also
SearchFilter, TagCategory, Result, ModIOUnityAsync.GetTagCategories
void Example()
{
ModIOUnity.GetTagCategories(GetTagsCallback);
}
void GetTagsCallback(ResultAnd&#60;TagCategory[]&#62; response)
{
if (response.result.Succeeded())
{
foreach(TagCategory category in response.value)
{
foreach(Tag tag in category.tags)
{
Debug.Log(tag.name + " tag is in the " + category.name + "category");
}
}
}
else
{
Debug.Log("failed to get game tags");
}
}

◆ GetTermsOfUse()

static void ModIO.ModIOUnity.GetTermsOfUse ( Action< ResultAnd< TermsOfUse > >  callback)
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 callback 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()

Parameters
serviceProviderThe 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)
callbackCallback to invoke once the operation is complete containing a result and a hash code to use for authentication via third party providers.
See also
TermsOfUse, AuthenticateUserViaDiscord, AuthenticateUserViaGoogle, AuthenticateUserViaGOG, AuthenticateUserViaItch, AuthenticateUserViaOculus, AuthenticateUserViaSteam, AuthenticateUserViaSwitch, AuthenticateUserViaXbox, ModIOUnityAsync.GetTermsOfUse
void Example()
{
ModIOUnity.GetTermsOfUse(GetTermsOfUseCallback);
}
void GetTermsOfUseCallback(ResultAnd&#60;TermsOfUse&#62; response)
{
if (response.result.Succeeded())
{
Debug.Log("Successfully retrieved the terms of use: " + response.value.termsOfUse);
}
else
{
Debug.Log("Failed to retrieve the terms of use");
}
}

◆ InitializeForUser() [1/2]

static void ModIO.ModIOUnity.InitializeForUser ( string  userProfileIdentifier,
Action< Result callback 
)
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.

Parameters
userProfileIdentifierName of the directory to store the user's data in.
callbackCallback to invoke once the initialization is complete.
See also
Result, Shutdown
void Example()
{
ModIOUnity.InitializeForUserAsync("ExampleUser", InitializationCallback);
}
void InitializationCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("Initialized plugin");
}
else
{
Debug.Log("Failed to initialize plugin");
{
}

◆ InitializeForUser() [2/2]

static void ModIO.ModIOUnity.InitializeForUser ( string  userProfileIdentifier,
ServerSettings  serverSettings,
BuildSettings  buildSettings,
Action< Result callback 
)
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.

Parameters
userProfileIdentifierName of the directory to store the user's data in.
serverSettingsData used by the plugin to connect with the mod.io service.
buildSettingsData used by the plugin to interact with the platform.
callbackCallback to invoke once the initialization is complete.
See also
FetchUpdates, ServerSettings, BuildSettings, Result, Shutdown
void Example()
{
// Setup a ServerSettings struct
ServerSettings serverSettings = new ServerSettings();
serverSettings.serverURL = "https://api.test.mod.io/v1";
serverSettings.gameId = 1234;
serverSettings.gameKey = "1234567890abcdefghijklmnop";
// Setup a BuildSettings struct
BuildSettings buildSettings = new BuildSettings();
buildSettings.LogLevel = LogLevel.Verbose;
buildSettings.UserPortal = UserPortal.None;
buildSettings.requestCacheLimitKB = 0; // No limit
ModIOUnity.InitializeForUserAsync("ExampleUser", serverSettings, buildSettings, InitializationCallback);
}
void InitializationCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("Initialized plugin");
}
else
{
Debug.Log("Failed to initialize plugin");
{
}
UserPortal
Values representing the valid User Portals that mod.io works with.
Definition: UserPortal.cs:5

◆ IsAuthenticated()

static void ModIO.ModIOUnity.IsAuthenticated ( Action< Result callback)
static

Informs you if the current user session is authenticated or not.

Parameters
callback
See also
Result, ModIOUnityAsync.IsAuthenticated
void Example()
{
ModIOUnity.IsAuthenticated(IsAuthenticatedCallback);
}
void IsAuthenticatedCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("current session is authenticated");
}
else
{
Debug.Log("current session is not authenticated");
}
}

◆ IsInitialized()

static bool ModIO.ModIOUnity.IsInitialized ( )
static

You can use this to quickly identify whether or not the plugin has been initialized.

Returns
true if the plugin is initialized
void Example()
{
if (ModIOUnity.IsInitialized())
{
Debug.Log("The plugin is initialized");
}
else
{
Debug.Log("The plugin is not initialized");
}
}

◆ IsModManagementBusy()

static bool ModIO.ModIOUnity.IsModManagementBusy ( )
static

Checks if the automatic management process is currently awake and performing a mod management operation, such as installing, downloading, uninstalling, updating.

Returns
True if automatic mod management is currently performing an operation.
See also
EnableModManagement, DisableModManagement, GetCurrentModManagementOperation
void Example()
{
if (ModIOUnity.IsModManagementBusy())
{
Debug.Log("mod management is busy");
}
else
{
Debug.Log("mod management is not busy");
}
}

◆ RateMod()

static void ModIO.ModIOUnity.RateMod ( ModId  modId,
ModRating  rating,
Action< Result callback 
)
static

Used to submit a rating for a specified mod.

This can be used to change/overwrite previous ratings of the current user.

Parameters
modIdthe m=ModId of the mod being rated
ratingthe rating to give the mod. Allowed values include ModRating.Positive, ModRating.Negative, ModRating.None
callbackcallback with the result of the request
See also
ModRating, Result, ModId, ModIOUnityAsync.RateMod
ModProfile mod;
void Example()
{
ModIOUnity.RateMod(mod.id, ModRating.Positive, RateModCallback);
}
void RateModCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("Successfully rated mod");
}
else
{
Debug.Log("Failed to rate mod");
{
}

◆ RemoveUserData()

static Result ModIO.ModIOUnity.RemoveUserData ( )
static

De-authenticates the current Mod.io user for the current session and clears all user-specific data stored on the current device. Installed mods that do not have other local users subscribed will be uninstalled if ModIOUnity.EnableModManagement() has been used to enable the mod management system. (If ModManagement is enabled).

If you dont want to erase a user be sure to use ModIOUnity.Shutdown() instead. If you re-initialize the plugin after a shutdown the user will still be authenticated.

See also
EnableModManagement(ModIO.ModManagementEventDelegate), Result
void Example()
{
Result result = ModIOUnity.RemoveUserData();
if (result.Succeeded())
{
Debug.Log("The current user has been logged and their local data removed");
}
else
{
Debug.Log("Failed to log out the current user");
}
}

◆ Report()

static void ModIO.ModIOUnity.Report ( Report  report,
Action< Result callback 
)
static

Reports a specified mod to mod.io.

Parameters
reportthe object containing all of the details of the report you are sending
callbackcallback with the Result of the report
See also
Report, Result, ModIOUnityAsync.Report
void Example()
{
Report report = new Report(new ModId(123),
ReportType.Generic,
"reporting this mod for a generic reason",
"JohnDoe",
"johndoe@mod.io");
ModIOUnity.Report(report, ReportCallback);
}
void ReportCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("successfully sent a report");
}
else
{
Debug.Log("failed to send a report");
}
}
static void Report(Report report, Action< Result > callback)
Reports a specified mod to mod.io.
Definition: ModIOUnity.cs:1755

◆ RequestAuthenticationEmail()

static void ModIO.ModIOUnity.RequestAuthenticationEmail ( string  emailaddress,
Action< Result callback 
)
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 callback 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.

Parameters
emailaddressthe Email Address to send the security code to, eg "JohnDoe@gmail.com"
callbackCallback to invoke once the operation is complete
See also
SubmitEmailSecurityCode, Result, ModIOUnityAsync.RequestAuthenticationEmail
void Example()
{
ModIOUnity.RequestAuthenticationEmail("johndoe@gmail.com", RequestAuthenticationCallback);
}
void RequestAuthenticationCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("Succeeded to send security code");
}
else
{
Debug.Log("Failed to send security code to that email address");
}
}

◆ SetLoggingDelegate()

static void ModIO.ModIOUnity.SetLoggingDelegate ( LogMessageDelegate  loggingDelegate)
static

Assigns the logging delegate the plugin uses to output log messages that otherwise go to UnityEngine.Debug.Log(string)

If you don't wish to see [mod.io] logs appearing in the Unity console you can set your own delegate for handling logs and ignore them or display them elsewhere.

Parameters
loggingDelegateThe delegate for receiving log messages
See also
LogMessageDelegate, LogLevel
void Example()
{
// Send logs to MyLoggingDelegate instead of Debug.Log
ModIO.SetLoggingDelegate(MyLoggingDelegate);
}
public void MyLoggingDelegate(LogLevel logLevel, string logMessage)
{
// Handle the log entry
if (logLevel == LogLevel.Error)
{
Debug.Log("We received an error with message: " + logMessage);
}
}
Definition: CreationToken.cs:3

◆ Shutdown()

static void ModIO.ModIOUnity.Shutdown ( Action  shutdownComplete)
static

Cancels any running public operations, frees plugin resources, and invokes any pending callbacks with a cancelled result code.

Callback results invoked during a shutdown operation can be checked with Result.IsCancelled()

See also
Result
void Example()
{
ModIOUnity.Shutdown(ShutdownCallback);
}
void ShutdownCallback()
{
Debug.Log("Finished shutting down the ModIO Plugin");
}

◆ SubmitEmailSecurityCode()

static void ModIO.ModIOUnity.SubmitEmailSecurityCode ( string  securityCode,
Action< Result callback 
)
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.

Parameters
securityCodeThe security code received from an authentication email
callbackCallback to invoke once the operation is complete
See also
RequestAuthenticationEmail, Result, ModIOUnityAsync.SubmitEmailSecurityCode
void Example(string userSecurityCode)
{
ModIOUnity.SubmitEmailSecurityCode(userSecurityCode, SubmitCodeCallback);
}
void SubmitCodeCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("You have successfully authenticated the user");
}
else
{
Debug.Log("Failed to authenticate the user");
}
}

◆ SubscribeToMod()

static void ModIO.ModIOUnity.SubscribeToMod ( ModId  modId,
Action< Result callback 
)
static

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.

Parameters
modIdModId of the mod you want to subscribe to
callbackcallback with the result of the request
See also
Result, ModId, EnableModManagement(ModIO.ModManagementEventDelegate), GetCurrentModManagementOperation, ModIOUnityAsync.SubscribeToMod
ModProfile mod;
void Example()
{
ModIOUnity.SubscribeToMod(mod.id, SubscribeCallback);
}
void SubscribeCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("Successfully subscribed to mod");
}
else
{
Debug.Log("Failed to subscribe to mod");
{
}

◆ UnsubscribeFromMod()

static void ModIO.ModIOUnity.UnsubscribeFromMod ( ModId  modId,
Action< Result callback 
)
static

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.

Parameters
modIdModId of the mod you want to unsubscribe from
callbackcallback with the result of the request
See also
Result, ModId, EnableModManagement(ModIO.ModManagementEventDelegate), GetCurrentModManagementOperation, ModIOUnityAsync.UnsubscribeFromMod
ModProfile mod;
void Example()
{
ModIOUnity.UnsubscribeFromMod(mod.id, UnsubscribeCallback);
}
void UnsubscribeCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("Successfully unsubscribed from mod");
}
else
{
Debug.Log("Failed to unsubscribe from mod");
{
}

◆ UploadModfile()

static void ModIO.ModIOUnity.UploadModfile ( ModfileDetails  modfile,
Action< Result callback 
)
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).

Parameters
modfilethe mod file and details to upload
callbackcallback with the Result of the upload when the operation finishes
See also
Result, ModfileDetails, ArchiveModProfile, GetCurrentUploadHandle, ModIOUnityAsync.UploadModfile
ModId modId;
void Example()
{
ModfileDetails modfile = new ModfileDetails();
modfile.modId = modId;
modfile.directory = "files/mods/mod_123";
ModIOUnity.UploadModfile(modfile, UploadModCallback);
}
void UploadModCallback(Result result)
{
if (result.Succeeded())
{
Debug.Log("uploaded mod file");
}
else
{
Debug.Log("failed to upload mod file");
}
}

The documentation for this class was generated from the following file: