UMod
A mod asset represents a loadable asset type that has been built into the mod.
Assets can be anything from prefabs to texures or materials.
Get the unique asset id for this mod asset.
Returns the full path of the asset relative to the project folder of the exporter.
Note that the extension of the asset is also included.
A valid example path would be: 'assets/testmod/cube.prefab', where 'testmod' represents the export mod folder.
Returns the asset path relative to the export mod folder without the extension.
For example: An asset with the full name 'assets/testmod/sub/cube.prefab' will have the relative name 'sub/cube'.
Returns the name of the asset.
Returns the file extension for the asset, For example '.prefab'.
Returns true if this asset is currently loaded or false if it is not.
It is possible for a to outlive a mod host in which case the asset it was referencing becomes unavailable.
This property will return true if the asset is alive and loadable indicating that the mod host owning the assets is also still loaded.
Returns the associated with this asset.
If the asset is not loaded then it will be loaded automatically meaning the return value should never be null.
Override ToString.
A string representation of the mod asset including the relative name
Attempts to load this from the mod.
When true, if the asset has already been loaded then a cached instance will be returned to avoid reloading
The loaded asset
The mod that owns the assets has been unloaded
Attempts to load this as the specified generic type.
The generic type to load the asset as
When true, if the asset has already been loaded then a cached instance will be returned to avoid reloading
The loaded asset as the generic type
The mod that owns the assets has been unloaded
Attempts to load this from the mod asynchronously.
When true, if the asset has already been loaded then a cached instance will be reused
The mod that owns the assets has been unloaded
Attempts to load this from the mod asynchronously and pass the result to the callback method as the specified generic type.
The generic type to load the asset as
When true, if the asset has already been loaded than a cached instance will be reused
The mod that owns the assets has been unloaded
Responsible for handling loading requests by the modder as well as loading requests issues directly through the mod
host
Represents the loaded permissions as assigned by the develope in the unity editor
An enum value representing the type of log message.
The log is information.
The log is a warning.
The log is an error.
The log is an exception.
This interface should be implemented when a custom log handler is required.
Use to register the implementation with a .
Called by the active for the current mod when a message should be logged.
The time that the log message was generated
The name info for the mod that generated the log
The type of the log message
The content of the message
A is a dedicated log handler which is associated with a and can be used to log messages in a mod specific context.
You are also able to register any number of log receivers to handle how the logged data is used.
Get an enumerable collection of all registered instances.
Get the number of registered with this handler.
Should the handler generate a stack trace for each logged message.
By default, stack traces are enabled.
note that generating a stack trace for each log message will have an small impact on performance.
Add the specified to this handler in order to recieve logged messages.
The instance to add
Remove the specified from this handler.
The instance to remove
Causes all registered instances to be removed from this handler.
Log a message to the debug handler.
The message to log
Log a message to the debug handler.
The format of the message
The arguments to be formatted
Log a warning to the debug handler.
The message to log
Log a warning to the debug handler.
The format of the message
The arguments to be formatted
Log an error to the debug handler.
The message to log
Log an error to the debug handler.
The format of the message
The arguments to be formatted
Log an exception to the debug handler.
The exception to log
Represents a message that has been logged by a .
Get the type of the message.
Get the content of the message.
Get the stack trace for the message.
If a stack trace was not generated then this value will be null.
Get the exception that was thrown.
If an exception was not thrown then this value will be null.
Returns true if this message has a stack trace available.
Use to access the stack trace.
Returns true if this message has an exception available.
use to access the exception.
Override implementation of .
A string representation of this instance
Moddable content info that is used to store or retrieve component asset information.
The asset content for the target component.
The index for the asset content indicating where the asset should be stored in the target components asset array.
This value will be set to '-1' for components that only accept a single source asset.
Returns a value indicating whether the content should be applied at a specific index.
Create new moddable component content from the specified source asset
The asset content
Create new moddable component content for the specified source asset with a target array index value.
The asset content
The asset array index or '-1' if the asset should be assigned to the default asset slot
Try to get the asset content as the specified generic type.
The generic type to return the asset content as
The asset content as the specified generic type or null if the asset content could not be converted to the generic type
A component can be attached to a scene game object or a prefab and allows a single component to be moddable be swapping its source asset(s) with equivilent modded content.
Modders are able to create new asset content in their mods such as materials, textures and more. These assets can then be placed in specific folders with specific names relating to the target game object/prefab that they intend to modify.
The target folder and asset name is dictated by the naming scheme which is auto generated when moddable content components are added to the scene.
The developer will have the option to modify the naming scheme via the UMod Settings window.
Where the moddable component should get its configuration settings from.
Use the global uMod moddable settings accessible via the UModSettings window.
Use custom settings as defined on the individual component.
The type of asset that is moddable on the target component.
The mesh asset of the target component is moddable.
The mesh asset of the target component is moddable via a modded prefab mesh.
The material asset of the target componet is moddable.
The texture asset of the target component is moddable.
The animator controller asset of the target component is moddable.
Conflit behaviour that specifies what should happen when one or more mods with identical moddable content are loaded.
The first mod loaded with the matching moddable content will obtain the right to modify the game object content.
Any mods that are loaded after the content has already been modified will obtain the right to modify the game object content.
Revert to the default asset that was used when the game loaded prior to applying any mod content.
Unload behaviour that specifies what should happen when the mod owning the moddable content will be unloaded.
When the owning mod is unloaded any modded content will be reverted to the initial asset.
When the owning mod is unloaded, any modded content will be reverted and any previously conflicting content from another mod with the same assets references will be loaded in place.
Leave all asset references as they are. This may cause objects to be rendered in magenta as materials and shareds are unloaded etc.
Detemrines whether this component will use the global settings for moddable behaviour of use custom settings as defined on the component.
The that should occur when one or more mods with the same target moddable content are loaded.
When enabled, mod assets can append array indexing syntax '[...]' to the end of thier file names in order to indicate that a certain asset should be assigned to the specified index.
This can be useful for material and texture assets where more that one asset could be assinged to a single object.
When enabled, any moddable content that was applied via this component will be reverted to the original asset when the component is destroyed.
The that can be modified on the target component.
This asset type must match the componentes accepted asset type. For example: A mesh filter component could accept a Mesh asset.
The target component that can be modified.
The specified component must be compatible with the target asset type.
When enabled, the moddable content will automatically be applied when the scene is loaded or when a new mod is loaded.
When enabled, all content loading will be performed asynchronously to prevent blocking the main thread.
The that uniquley identifies the parent gamne object in the moddable naming scheme.
Return the conflict behaviour for this component based on value.
When in editor mode (Not playing), this property will always return the value of .
Return the unload behaviour for this component based on value.
When in editor mode (Not playing), this proeprty will always return the value of .
Return a value indicating whether asset indexing is allowed for this component based on value.
When in editor mode (Not playing), this property will always return the value of .
Return a value indicating whether modded content should be reverted to default for this component when it is destroyed base on value.
When in editor mode (Not playing), this property will always return the value of .
Called by Unity.
Called by Unity.
Called by Unity.
Called by Unity editor.
Called by Unity editor.
Called when a new mod has been loaded by uMod.
The of the newly loaded mod
Called when then owning mod host is about to be unloaded.
Attempt to apply moddable content from any loaded mods with matching mod content.
Conflicts will be handled based on the value.
Attempt to apply moddable content from the specified loaded mods wtih matching content.
All mod hosts passed to this method should have a valid mod loaded otherwise they will be ignored.
Conflicts will be handled based on the value.
An array of to check for suitable moddable content
Attempt to revert any applied moddable content to use the original game assets.
Return the first applied moddable content for the target component or null if no moddable content has been applied.
A representing the applied mod content
Return an array of all applied moddable content.
An array of representing all applied content or an empty array if no moddable content has been applied
Attempt to get the original initial game asset that was assigned to the target component on startup at the specified array index.
Use '-1' when the target component does not support more than one asset or to get the default asset for the component.
The array index value where the content was retrieved from
A instance representing the initial content of the target component for the specified index value
Called when the target component will have its asset content modded.
The target component that will be modified
The new moddable content that will be applied to the component
Called when the target component will have its asset reverted to default.
The target component that will be reverted
The original game asset content that will be re-applied to the component to revert back to the original asset
Get or create a unique that identifies the specified game object in the moddable asset naming scheme.
The game object to get or create a unique reference for
A instance for the specified game object
Represents a unique reference to a moddable game object identified by a 64-bit Id value.
Note that the reference is to the game object and not the component.
Returns a value indicationg whether this object reference has been assigned a value.
Override implementation.
Checks for equality based on the inner value.
The object to check for equality
True if the objects are equal
Override implementation.
Called by Unity.
Called by Unity.
Create new moddable object reference and generate a unique reference Id.
A new unique moddable object reference
Implicit conversion to inner 64-bit Id value.
The object reference to convert
Helper class used to manage a local directory where mods are located.
Helps developers to manage a specific directory where mods should be installed.
Get the DirectoryInfo for this current .
Should sub folders of also be detected.
When true, sub folders will be checked reccursivley as well as the target folder.
Are mod name searches case sensitive.
Default is false.
Allows the developer to determine whether any mods are installed.
This property will return true if there are any mods located in the directory.
Check whether the target mod directory actually exists.
The directory should exists otherwise you may receive when calling associated methods.
Allows the devloper to determine how many mods are installed.
Get the number of mods that are inside the directory.
Attempts to create the mod directory at the file system .
The mod directory should exist before calling other associated methods.
Refreshes the directory location in order to detect newly added mods.
If you add a new mod into the directory location then you will need to call this method in order for it to be detcted and returned by all other methods.
Attempts to search through the mod directory looking for a mod with the specified name and version.
If a mod with the specified name and version was found then the return value will be true.
The name of the mod to look for
The version of the mod to look for in the format 'x.x.x'. You can specify null as the version in which case only the name of the mod will be used in the search
True if a matching mod is installed or false if not
Returns true if the specified FileInfo is a valid mod file.
The file to check
True if the specified file is a mod or false if not
Contains useful error information for a mod load attempts.
Get the elapsed time of the load.
Get the exception that was thrown during the load or null if no exception was thrown.
Get the that occurred during the load.
Was the load successful.
Get the error message for the load error.
An excecution context contains information about all current executing mod scripts.
Returns true if the script engine is currently executing one or more scripts.
Get all currently executing scripts via their proxy objects.
Attempt to activate the specified .
Activation will cause all mod types to be created and have their event called.
The assembly to activate
An array of proxy objects represented all the mod types that were created
Attempt to activate the specified .
Activation will cause an instance of the type to be constructed and initialized in the current .
The to activate
The parent game object fo the script. Only applicable if the scripts derives from
A proxy object representing the created type
Broadcasts a message to all running mod scripts.
The name of the method to call on mod scripts
Broadcasts a message to all running mod scripts passing the specified arguments.
The name of the method to call on mod scripts
An array of arguments to pass to the method
Immediatley stop any executing mod scripts that are currently running.
All executing scripts will be terminated correctly and will receive the event if applicable.
A represents a managed assembly that has been loaded into a at runtime.
Get the name of the assembly.
Get the version of the wrapped assembly.
Get the full name of the wrapped assembly.
Get the that this is currently loaded in.
Gets the main type for the assembly. This will always return the first defined type in the assembly which is especially useful for assemblies that only define a single type.
Get the that this wraps.
Create a new wrapper for the specified loaded .
Run security verification on this assembly using the specified security restrictions.
The restrictions used to verify the assembly
True if the assembly passes security verification or false if it fails
Run security verification on this assembly using the specified security restrictions and output a security report
The restrictions used to verify the assembly
The security report generated by the assembly checker
True if the assembly passes security verification or false if it fails
Returns true if this defines a type with the specified name.
Depending upon settings, name comparison may or may not be case sensitive.
The name of the type to look for
True if a type with the specified name is defined
Returns true if this defines one or more types that inherit from the specified type.
The specified type may be a base class or interface type.
The type to check for in the inheritace chain
True if there are one or more defined types that inherit from the specified type
Returns true if this defines a type that inherits from the specified type and matches the specified name.
Depending upon settings, name comparison may or may not be case sensitive.
The type to check for in the inheritance chain
The name of the type to look for
True if a type that inherits from the specified type and has the specified name is defined
Returns true if this defined one or more types that inherit from the specified generic type.
The specified generic type may be a base class or interface type.
The generic type to check for in the inheritance chain
True if there are one or more defined types that inherit from the specified generic type
Returns true if this defines a type that inherits from the specified genric type and matches the specified name.
Depending upon settings, name comparison may or may not be case sensitive.
The generic type to check for in the inheritance chain
The name of the type to look for
True if a type that inherits from the specified type and has the specified name is defined
Attempts to find a type defined in this with the specified name.
Depending upon settings, name comparison may or may not be case sensitive.
The name of the type to look for
An instance of representing the found type or null if the type could not be found
Attempts to find a type defined in this that inherits from the specified base type.
If there is more than one type that inherits from the specified base type, then the first matching type will be returned.
If you want to find all types then use .
The type to check for in the inheritance chain
Should the search include non public types
An instance of representing the found type or null if the type could not be found
Attempts to find a type defined in this that inherits from the specified base type and matches the specified name.
Depending upon settings, name comparison may or may not be case sensitive.
The type to check for in the inheritance chain
The name of the type to look for
An instance of representing the found type or null if the type could not be found
Attempts to find a type defined in this that inherits from the specified generic type.
If there is more than one type that inherits from the specified generic type, then the first matching type will be returned.
If you want to find all types then use .
Should the search include non public types
The generic type to check for in the inheritance chain
An instance of representing the found type or null if the type could not be found
Attempts to find a type defined in this that inherits from the specified generic type and matches the specified name.
Depending upon settings, name comparison may or may not be case sensitive.
The generic type to check for in the inheritance chain
The name of the type to look for
An instance of representing the found type or null if the type could not be found
Attempts to find all types defined in this that inherits from the specified type.
If there are no types that inherit from the specified type then the return value will be an empty array.
The type to check for in the inheritance chain
Should the search include non public types
(Not Null) An array of or an empty array if no matching type was found
Attempts to find all types defined in this that inherit from the specified generic type.
If there are no types that inherit from the specified type then the return value will be an empty array.
The generic type to check for in the inheritance chain
(Not Null) An array of or an empty array if no matching type was found
Returns an array of all defined types in this .
An array of representing all types defined in this
Attempts to find all types defined in this that inherit from .
If there are no types that inherit from then the return value will be an empty array.
(Not Null) An array of or an empty array if no matching type was found
Attempts to find all types defined in this that inherit from .
If there are no types that inherit from then the return value will be an empty array.
(Not Null) An array of or an empty array if no matching type was found
Attempts to find all types defined in this that inherit from .
If there are no types that inherit from then the return value will be an empty array.
(Not Null) An array of or an empty array if no matching type was found
Enumerate all types defined in this that inherits from the specified type.
The type to check for in the inheritance chain
Should the search include non public types
Enumerable of matching results
Enumerate all types defined in this that inherit from the specified generic type.
The generic type to check for in the inheritance chain
Enumerable of matching results
Enumerate all defined types in this .
Enumerable of all results
Enumerate all types defined in this that inherit from .
Enumerable of matching results
Enumerate all types defined in this that inherit from .
Enumerable of matching results
Enumerate all types defined in this that inherit from .
Enumerable of matching results
A acts as a container for all code that is loaded dynamically at runtime.
Despite the name, the code is not actually loaded into an isolated domain but is instead loaded into the main application domain. This is due to unity restrictions.
The main responsiblility of the domin is to separate pre-compiled game code from runtime-loaded code.
As a result, you will only be able to access types from the domain that were loaded at runtime.
Any pre-compiled game code will be ignored.
Any assemblies or scripts that are loaded into the domain at runtime will remain until the application exits so you should be careful to avoid loading too many assemblies.
You would typically load user code at statup in a 'Load' method which would then exist and execute until the game exits.
Multiple domain instances may be created but you should note that all runtime code will be loaded into the current application domain. The simply masks the types that are visible.
Get all assemblies loaded into this domain.
Enumerate all assemblies loaded into this domain.
Has this domain been disposed.
Get the for this domain.
Attempts to load a managed assembly from the specified resources path into the sandbox app domain.
The target asset must be a in order to be loaded successfully.
The file name of path relative to the 'Resources' folder without the file extension
An instance of representing the loaded assembly or null if an error occurs
The assembly breaches the imposed security restrictions
Attempts to load the specified managed assembly into the sandbox app domain.
The full path the the .dll file
An instance of representing the loaded assembly or null if an error occurs
The assembly breaches the imposed security restrictions
Attempts to load the specified managed assembly into the sandbox app domain.
The representing the assembly to load
An instance of representing the loaded assembly or null if an error occurs
The assembly breaches the imposed security restrictions
Attempts to load a managed assembly from the specified raw bytes.
The raw data representing the file structure of the managed assembly, The result of for example.
An instance of representing the loaded assembly or null if an error occurs
The assembly breaches the imposed security restrictions
Attempts to load a managed assembly from the specified raw bytes.
The debug symbols for the assembly will also be loaded from the specified symbol data.
The raw data representing the file structure of the managed assembly, The result of for example
The mono debugging symbols for the assembly
An instance of representing the loaded assembly or null if an error occurs
The assembly breaches the imposed security restrictions
Attempts to load the managed assembly at the specified location.
Any exceptions throw while loading will be caught.
The full path to the .dll file
An instance of representing the loaded assembly or null if the load failed
True if the assembly was loaded successfully or false if an error occurred
Attempts to load a managed assembly with the specified name.
Any exceptions thrown while loading will be caught.
The of the assembly to load
An instance of representing the loaded assembly or null if the load failed
True if the assembly was loaded successfully or false if an error occurred
Attempts to load a managed assembly from the raw assembly data.
Any exceptions thrown while loading will be caught.
The raw data representing the file structure of the managed assembly, The result of for example.
An instance of representing the loaded assembly or null if the load failed
True if the assembly was loaded successfully or false if an error occured
Attempts to load a managed assembly from the raw assembly data.
The debug symbols for the assembly will also be loaded from the specified symbol data.
Any exceptions thrown while loading will be caught.
The raw data representing the file structure of the managed assembly, The result of for example.
The mono debugging symbols for the assembly
An instance of representing the loaded assembly or null if the load failed
The security hash of the assembly used to avoid security checks
True if the assembly was loaded successfully or false if an error occured
Attempts to load and activate a managed assembly from the resources folder.
The resource asset must be a TextAsset in order to be loaded successfully.
The assembly will also be activated using meaning that all mod script types will be created and will start receiving events.
The resources path of the asset to load
An instance of representing the loaded assembly or null if an error occurs
The assembly breaches the imposed security restrictions
Attempts to load and activate a managed assembly from the specified path.
The assembly will also be activated using meaning that all mod script types will be created and will start receiving events.
The filepath or name of the assembly to load
An instance of representing the loaded assembly or null if an error occurs
The assembly breaches the imposed security restrictions
Attempts to load and activate a managed assembly with the specified .
The assembly will also be activated using meaning that all mod script types will be created and will start receiving events.
Note that security checks cannot be performed when using this load method. If security checks are required then use one of the other overloads.
The name of the assembly to load
An instance of representing the loaded assembly or null if an error occurs
Attempts to load and activate a managed assembly for the specified raw bytes.
The assembly will also be activated using meaning that all mod script types will be created and will start receiving events.
The 'byte[]' representing the raw assembly data
An instance of representing the loaded assembly or null if an error occurs
The assembly breaches the imposed security restrictions
Attempts to load and activate a managed assembly from the specified raw bytes along with the debugging symbols.
The assembly will also be activated using meaning that all mod script types will be created and will start receiving events.
The 'byte[]' representing the raw assembly data
The 'byte[]' representing the raw debugging symbol data
An instance of representing the loaded assembly or null if an error occurs
The assembly breaches the imposed security restrictions
Attempts to load and activate a managed assembly from the specified path.
The assembly will also be activated using meaning that all mod script types will be created and will start receiving events.
Any exceptions that are thrown during loading will be caught and cause a load failure.
The filepath or name of the assembly to load
An instance of representing the loaded assembly or null if the assembly could not be loaded
True if the assembly was loaded and activated successfully or false if not
Attempts to load and activate a managed assembly with the specified .
The assembly will also be activated using meaning that all mod script types will be created and will start receiving events.
Note that security checks cannot be performed when using this load method. If security checks are required then use one of the other overloads.
Any exceptions that are thrown during loading will be caught and cause a load failure.
The name of the assembly to load
An instance of representing the loaded assembly or null if the assembly could not be loaded
True if the assembly was loaded and activated successfully or false if not
Attempts to load and activate a managed assembly with the specified raw bytes.
The assembly will also be activated using meaning that all mod script types will be created and will start receiving events.
Note that security checks cannot be performed when using this load method. If security checks are required then use one of the other overloads.
Any exceptions that are thrown during loading will be caught and cause a load failure.
The 'byte[]' representing the raw assembly data
An instance of representing the loaded assembly or null if the assembly could not be loaded
True if the assembly was loaded and activated successfully or false if not
Attempts to load and activate managed assembly from the specified raw bytes.
The debug symbols for the assembly will also be loaded from the specified symbol data.
Any exceptions that are thrown during loading will be caught and cause a load failure.
The raw data representing the file structure of the managed assembly, The result of for example
The mono debugging symbols for the assembly
An instance of representing the loaded assembly or null if the assembly could not be loaded
An instance of representing the loaded assembly or null if an error occurs
Attempts to perform security validation on the assembly at the specified location.
Failure to load the data will result in a fail result.
The fullpath to the managed assembly
The security validated and laoded assembly
The security engine used to validate the code
The security report generated by the code security engine if code validate was run
Should the checker throw an exception on error
True if the assembly passed security checks or false if the assembly breaches security or another error occured
The code does not meet the security restrictions defined in the settings menu
Attempts to perform security validation on the specified assembly name.
Failure to load the data will result in a fail result.
The name of the assembly to check
The security validated and laoded assembly
The security engine used to validate the code
The security report generated by the code security engine if code validate was run
Should the checker throw an exception on error
True if the assembly passed security checks or false if the assembly breaches security or another error occured
The code does not meet the security restrictions defined in the settings menu
Attempts to perform security validation on the specified assembly data.
Failure to load the data will result in a fail result.
The raw data of the managed assembly
The security validated and laoded assembly
The security engine used to validate the code
The security report generated by the code security engine if code validate was run
Should the checker throw an exception on error
True if the assembly passed security checks or false if the assembly breaches security or another error occured
The code does not meet the security restrictions defined in the settings menu
Destroy the script domain and any mod code that is currently executing.
If you just want to stop running mod scripts then use .
Represents a member group collection that allows access to all members of a specific type.
The members data may be accessed via its member name which means that non-concrete communication is possible.
"/>
Attempt to read from or write to a member of the managed type.
The name of the member to find
The value for the specified member
A allows access to the fields of a type using a string identifier to lookup the field name"/>
Attempt to read from or write to a field on the managed type with the specified name.
The object value will need to be cast to the desired type when reading the value.
The name of the field to modify
The value of the field witht he specified name
The target field could not be found on the managed type
A allows access to the properties of a type using a string identifier to lookup the field name"/>
Attempt to read from or write to a field on the managed type with the specified name.
Any exceptions thrown by the set or get accessor will not be handled.
The object value will need to be cast to the desired type when reading the value.
The name of the property to find
The value of the field witht he specified name
The target property could not be found on the managed type
Attempted to read from the property but a get accessor could not be found
Attempted to write to the property but a set accessor could not be found
The method calling convention used when invoking a method.
Call the method as normal.
Call the method as a Unity coroutine.
The method should return an 'IEnumerator' to be invoked as a coroutine.
The method will be invoked and managed by a game object and updated every frame.
Call the method based on its return type.
Methods that return 'IEnumerator' will be automatically invoked as a Unity coroutine.
A acts as a wrapper for a type instance and allows non-concrete communication if the type is unknown at compile time.
Get the of this proxy object.
The proxy has already been disposed
Returns the that provides access to the fields of the wrapped type.
The proxy has already been disposed
Returns the that provides access to the properties of the wrapped type.
The proxy has already been disposed
Get the instance of the script as an object.
Use this property to access the managed instance.
The proxy has already been disposed
Access the wrapped instance as a unity .
The proxy has already been disposed
Get the instance of the script as a .
This property will return null if the wrapped type does not inherit from .
The proxy has already been disposed
Get the instance of the script as a .
This property will return null if the wrapped type does not inherit from .
The proxy has already been disposed
Returns true if the inherits from .
If this value is true then it is safe to cast this proxy into a for Unity specific operations.
The proxy has already been disposed
Returns true if the managed type inherits from .
This is equivilent of calling .
The proxy has already been disposed
Returns true if the managed type inherits from .
This is equivilent of calling .
The proxy has already been disposed
Returns true if the proxy has been disposed.
Be careful, the proxy can become disposed automatically if the managed type is destroyed by Unity.
This can occur during scene changes for MonoBehaviour components and cause the proxy to become invalid.
If you want to make sure the wrapped type is not dispoed automatically then you can call .
Create a new instance of a .
The to create an instance from
The raw instance
Attempt to call a method on the managed type with the specified name.
This works in a similar way as where the method name is specified.
The target method must not accept any arguments.
The name of the method to call
The value returned from the target method or null if the target method does not return a value
The proxy has already been disposed
The target method could not be found on the managed type
Attempt to call a method on the managed instance with the specified name.
This works in a similar way as where the method name is specified.
The target method must not accept any arguments.
The name of the method to call
The method calling convention
The value returned from the target method or null if the target method does not return a value
The proxy has already been disposed
The target method could not be found on the managed type
Attempt to call a method on the managed type with the specified name and arguments.
This works in a similar was as where the method name is specified.
Any number of arguments may be specified but the target method must expect the arguments.
The name of the method to call
The arguments passed to the method
The value returned from the target method or null if the target method does not return a value
The proxy has already been disposed
The target method could not be found on the managed type
Attempt to call a method on the managed instance with the specified name and arguments.
This works in a similar was as where the method name is specified.
Any number of arguments may be specified but the target method must expect the arguments.
The name of the method to call
The method calling convention
The arguments passed to the method
The value returned from the target method or null if the target method does not return a value
The proxy has already been disposed
The target method could not be found on the managed type
Attempt to call a method on the managed type with the specified name.
Any exceptions thrown as a result of location or calling the method will be caught silently.
This works in a similar was as where the target method name is specified.
The target method must not accept any arguments.
The name of the method to call
The value returned from the target method or null if the target method does not return a value
Attempt to call a method on the managed instance with the specified name.
Any exceptions thrown as a result of locating or calling the method will be caught silently.
This works in a similar was as where the target method name is specified.
The target method must not accept any arguments.
The name of the method to call
The method calling convention
The value returned from the target method or null if the target method does not return a value
Attempt to call a method on the managed type with the specified name.
Any exceptions thrown as a result of location or calling the method will be caught silently.
This works in a similar was as where the target method name is specified.
Any number of arguments may be specified but the target method must expect the arguments.
The name of the method to call
The arguments passed to the method
The value returned from the target method or null if the target method does not return a value
Attempt to call a method on the managed instance with the specified name.
Any exceptions thrown as a result of locating or calling the method will be caught silently.
This works in a similar was as where the target method name is specified.
Any number of arguments may be specified but the target method must expect the arguments.
The name of the method to call
The method calling convention
The arguments passed to the method
The value returned from the target method or null if the target method does not return a value
Get the system type of the managed script type.
The proxy has already been disposed
Attempts to get the managed instance as the specified generic type.
The generic type to return the instance as
When false, any exceptions caused by the conversion will be caught and will result in a default value being returned. When true, any exceptions will not be handled.
The managed instance as the specified generic type or the default value for the generic type if an error occured
Dispose of the proxy and its managed script instance.
Once disposed, the proxy should never be accessed again.
Only call this method once you are sure you will never need the instance again.
The proxy has already been disposed
If the managed object is a Unity type then this method will call 'DontDestroyOnLoad' to ensure that the object is able to survie scene loads.
Checks whether the object has already been disposed and raises and exception if it has.
The proxy has already been disposed
Represents a type that may or may not derive from MonoBehaviour.
A is a wrapper for that contains methods for Unity specific operations.
The type may also be used to create instances of objects.
Get the that this wraps.
Get the name of the wrapped type excluding the namespace.
Get the namespace of the wrapped type.
Get the full name of the wrapped type including namespace.
Returns true if the wrapped type is public or false if not.
Get the that this is defined in.
Returns the that provides access to the static fields of the wrapped type.
Returns the that provides access to the static fields of the wrapped type.
Any exceptions thrown by locating or accessing the property will be handled.
Returns the that provides access to the static properties of the wrapped type.
Returns the that provides access to the static properties of the wrapped type.
Any exceptions thrown by locating or accessing the property will be handled.
Returns true if this type inherits from .
See also .
Returns true if this type inherits from .
Returns true if this type inherits from
Create a from a .
The to create the from
Creates an instance of this type.
The type will be constructed using the appropriate method (AddComponent, CreateInstance, new).
The to attach the instance to or null if the type is not a
The execution context to activate the script in. The execution context is required if the instance should recieve mod events such as />
An instance of
Creates an instance of this type.
The type will be constructed using the appropriate method (AddComponent, CreateInstance, new).
The to attach the instance to or null if the type is not a
The execution context to activate the script in. The execution context is required if the instance should recieve mod events such as />
The parameter list for the desired constructor. only used when the type does not inherit from
An instance of
Creates a raw instance of this type.
A raw instance will return the actual instance of the type as opposed to a which allows for more control.
The type will be constructed using the appropriate method (AddComponent, CreateInstance, new).
The to attach the instance to or null if the type is not a
The execution context to activate the script in. The execution context is required if the instance should recieve mod events such as />
A raw instance that can be cast to the desired type
Creates a raw instance of this type.
A raw instance will return the actual instance of the type as opposed to a which allows for more control.
The type will be constructed using the appropriate method (AddComponent, CreateInstance, new).
The to attach the instance to or null if the type is not a
The execution context to activate the script in. The execution context is required if the instance should recieve mod events such as />
The parameter list for the desired constructor. only used when the type does not inherit from
A raw instance that can be cast to the desired type
Creates an instance of this type and returns the result as the specified generic type.
A raw instance will return the actual instance of the type as opposed to a which allows for more control.
The type will be constructed using the appropriate method (AddComponent, CreateInstance, new).
The generic type to return the instance as
The to attach the instance to or null if the type is not a
The execution context to activate the script in. The execution context is required if the instance should recieve mod events such as />
A raw instance as the specified generic type
Creates an instance of this type and returns the result as the specified generic type.
A raw instance will return the actual instance of the type as opposed to a which allows for more control.
The type will be constructed using the appropriate method (AddComponent, CreateInstance, new).
The generic type to return the instance as
The to attach the instance to or null if the type is not a
The execution context to activate the script in. The execution context is required if the instance should recieve mod events such as />
The parameter list for the desired constructor. only used when the type does not inherit from
A raw instance as the specified generic type
Returns true if this type inherits from the specified type.
The base type
True if this type inherits from the specified type
Returns true if this type inherits from the specified type.
The base type
True if this type inherits from the specified type
Finds a field with the specified name from the cache if possible.
If the field is not present in the cache then it will be added automatically so that subsequent calls will be quicker.
The name of the field to find
Is the target field a static or instance field
The for the specified field
Finds a property with the specified name from the cache if possible.
If the property is not present in the cache then it will be added automatically so that subsequent calls will be quicker.
The name of the property to find
Is the target property a static or instance property
The for the specified property
Finds a method with the specified name from the cache if possible.
If the method is not present in the cache then it will be added automatically so that subsequent calls will be quicker.
The name of the method to find
Is the target method a static or instance method
The for the specified method
Attempts to call a static method on this with the specified name.
This works in a similar way as where the method name is specified.
The target method must be static and not accept any arguments.
The name of the static method to call
The value returned from the target method or null if the target method does not return a value
The target method could not be found on the managed type
The target method is not static
Attempts to call a static method on this with the specified name.
This works in a similar way as where the method name is specified.
The target method must be static and not accept any arguments.
The name of the static method to call
The arguemnts passed to the method
The value returned from the target method or null if the target method does not return a value
The target method could not be found on the managed type
The target method is not static
Attempts to call a static method on this with the specified name.
Any exceptions throw as a result of locating or calling the method will be caught silently
This works in a similar way as where the method name is specified.
The target method must be static and not accept any arguments.
The name of the static method to call
The value returned from the target method or null if the target method does not return a value
Attempts to call a static method on this with the specified name.
Any exceptions throw as a result of locating or calling the method will be caught silently
This works in a similar way as where the method name is specified.
The target method must be static and not accept any arguments.
The name of the static method to call
The arguments passed to the method
The value returned from the target method or null if the target method does not return a value
Override ToString implementation.
Attempt to find a type with the specified name in the specified .
The name of the type to find
The domain to search or null if the active domain should be used
A matching the specified type name or null if the type was not found
Attempt to find a type with the specified name in the specified that inherits from the specified base type.
The name of the type to find
The base type that the type must inherit from
The domain to search or null if the active domain should be used
A matching the specified type name and inheritance constraints or null if the type was not found
Attempt to find a type with the specified name in the specified that inherits from the specified generic base type.
The generic type that the type must inherit from
The name of the type to find
The domain to search or null if the active domain should be used
A matching the specified type name and inheritance constranints or null if the type was not found
Attempt to find the first type that inherits from the specfieid sub type.
The base type that the type should inherit from
The domain to search or null if the active domain should be used
A matching the specified inheritance constraints or null if the type was not found
Attempt to find the first type that inherits from the specified generic sub type.
The generic type that the type must inherit from
The domain to search or null if the active domain should be used
A matching the specified inheritance constraints or null if the type was not found
Attempt to find all types that inherit from the specified sub type.
The base type that the types must inherit from
Should non-public types be included in the search
The domain to search or null if the active domain should be used
An array of that inherit from the specified base type or an empty array if no types were found
Attempt to find all the types that inherit from the specified generic sub type.
The generic base type that the types must inherit from
Should non-public types be included in the search
The domain to search or null if the active domain should be used
An array of that inherit from the specified base type or an empty array if no types were found
Attempt to find all types in the specified domain.
Should non-public types be included in the search
The domai to search or null if the active domain should be used
An array of that exist in the specified domain or an empty array if no types were found
Attempts to find all types in the specified domain that inherit from .
Should non-public types be included in the search
The domain to search or null if the active domain should be used
An array of that inherit from or an empty array if no types were found
Attempts to find all types in the specified domain that inherit from .
Should non-public types be included in the search
The domain to search or null if the active domain should be used
An array of that inherit from or an empty array if no types were found
Attempts to find all types in the specified domain that inherit from .
Should non-public types be included in the search
The domain to search or null if the active domain should be used
An array of that inherit from or an empty array if no types were found
Enumerates all types that inherit from the specified sub type.
The base type that the types must inherit from
Should non-public types be included in the search
The domain to search or null if the active domain should be used
Enumerable of matching results
Enumerate all types that inherit from the specified generic sub type.
The generic base type that the types must inherit from
Should non-public types be included in the search
The domain to search or null if the active domain should be used
Enumerable of matching results
Enumerate all types in the specified domain.
Should non-public types be included in the search
The domain to search or null if the active domain should be used
Enumerable of matching results
Enumerate all types in the specified domain that inherit from .
Should non-public types be include in the search
The domain to search or null if the active domain should be used
Enumerable of matching results
Enumerate all types in the specified domain that inherit from .
Should non-public types be included in the search
The domain to search or null if the active domain should be used
Enumerable of matching results
Enumerate all types in the specified domain that inherit from .
Should non-public types be include in the search
The domain to search or null if the active domain should be used
Enumerable of matching results
Mod class that allows developers to trigger messages that get sent to the mod as well as access running mod hosts.
See also the component for mono behaviour functionality with added mod events and
methods.
Triggered when any mod host has completed the loading process even if the load failed.
The that triggered the event will be passed as an argument.
If multiple load requests are issued, this event will be triggered for each load request.
Called during mod loading when a reference needs to be loaded but cant be resolved automatically by the loader.
This allows you to manually specify the location of the referenced mod.
Access the mod command line arguments.
This allows for parsing the command line into Uri path objects for each mod specified.
Get the uMod default directory where mods can be installed.
This is equivilent to 'Application.persistentDataPath + "/Mods"'.
This directory will be used by default to load references and command line mods.
The folder location where uMod will store persistent data for mods.
By default this directory will be set to 'Application.persistentDataPath + "/Data/UMod"' but can be changed using the property setter.
Get the log receiver for umod. All loaded mods will log to this receiver.
Returns true if the current version of uMod is running in trial mode.
When in trial mode, uMod 2.0 cannot be used in release builds and the scripting system is disabled.
Returns true if the current runtime platform is supported by uMod.
When in editor play mode, this value will return true.
Only desktop platforms are supported (Windows, Mac linux).
Allows the developer to determine whether any mods are currently running.
Atleast one mod host must be successfully loaded for this property to be true.
Allows the developer to get the exact number of mods that are currently running.
The mod host must be succesfully loaded to be counted.
Parse all mod paths from the command line and load all mods.
An array of mod hosts representing each attempted command line load
Parse all mods from the command line and load asll asynchronously.
An async operation that can be yielded and contains infomration about the current loading progress
Load a mod from the specified .
A will be created to manage the mod and returned as the result.
If the mod is already loaded then this method will simply return the for the loaded mod.
The to load the mod from
Should the mod be automatially activated once loaded. See
The that is managing the mod
Load all mods from the specified paths.
A will be created for each path specified.
An array of to load from
Should the mods be automatially activated once loaded. See
An array of representing the managers for each load request
Loads all mods that are installed in the .
A will be created for each path specified.
If no mods are installed then this method will return an empty array.
Should the mods be automatially activated once loaded. See
The used to locate all installed mods. Passing null will cause the to be used as the target search directory
An array of representing the managers for each mod loaded. The length or the array can be used to determine the amount of load requests issued
Load all mods from the specified paths asynchronously.
A array will be created to manage the mod and returned as the result of the async operation.
The to load the mod from
Should the mod be automatially activated once loaded. See . Note that activation must be performed on the main thread which will block until completed
An awaitable object containing progress and status information whose value will be the host managing the load
Load a mod from the specified asynchronously.
A will be created to manage the mod and returned as the result of the async operation.
The async operation will not be complete until all mods have finished loading.
An array of to load from
/// Should the mods be automatially activated once loaded. See . Note that activation must be performed on the main thread which will block until completed
An awaitable object containing progress and status information whose value will be an array of hosts managing the load requests
Loads all mods that are installed in the asynchronously.
A will be created to manage the mod and returned as the result of the async operation.
If no mods are installed then this method will return an empty array.
The async operation will not be complete until all mods have finished loading.
/// Should the mods be automatially activated once loaded. See . Note that activation must be performed on the main thread which will block until completed
The used to locate all installed mods. Passing null will cause the to be used as the target search directory
An awaitable object containing progress and status information whose value will be an array of hosts managing the load requests
Accesses all loaded mods and calls to free the host.
Helper method to quickly unload all loaded mods.
When true, all mod host game obejcts will also be destroyed
Checks whether the mod at the specified path is currently loaded by any .
The Uri path to the mod
True if a mod with the same path is currently loaded or false if not
Checks whether a mod with the specified name is currently loaded by any .
The name of the mod
True if a mod with a matching name is currently loaded or false if not
Checks whether a mod with the specified name and version is currently loaded by any .
If a mod with a matching name is found but the version is not the same then the return value will be false.
The name of the mod
The version string of the mod e.g '1.0.0'
True if a mod with a matching name and version is currently loaded or false if not
Attempts to get the for a loaded mod at the specified path.
If the mod is not loaded then the return value will be null.
The path of the mod to look for
A or null if the mod is not loaded
Attempts to get the for a loaded mod with the specified name.
If the mod is not loaded then the return value will be null.
The name of the mod to look for
A or null if the mod is not loaded
Attempts to get the for a loaded mod with the specified name and version.
If a mod with the same name but different version is loaded then the return value will still be null (Explicit match).
If the mod is not loaded then the return value will be null.
The name of the mod to look for
The required version of the mod
A or null if the mod is not loaded
Allows the developer to trigger an event that mod classes may listen to.
Works in a similar way to the 'SendMessage' method of Unity but the message will only be sent to modded scripts.
Allows the developer to implement event callbacks similar to mono behaviour messages such as OnTriggerEnter.
The name of the method to trigger
Allows the developer to trigger an event that mod classes may listen to.
Works in a similar way to the 'SendMessage' method of Unity but the message will only be sent to modded scripts.
Allows the developer to implement event callbacks similar to mono behaviour messages such as OnTriggerEnter.
This overload allows a single value to be passed as an argument.
The name of the method to trigger
A value to be passed as an argument, Referenced Unity types are allowed
Allows the developer to trigger an event that mod classes may listen to.
Works in a similar way to the 'SendMessage' method of Unity but the message will only be sent to modded scripts.
Allows the developer to implement event callbacks similar to mono behaviour messages such as OnTriggerEnter.
This overload allows an undefined number of values to be apssed as arguments.
The name of the method to trigger
A param list of arguments to pass to the method, Referenced Unity types are allowed
Allows developers to request assets loads from any running mod host.
Allows pre-compiled mod assets to be loaded at runtime for any running that contains an
asset with the specified name.
Returns true if any loaded mod conatins an asset with the specified name.
The name of the asset to look for
True if the asset exists
Attempts to load an asset from a loaded mod.
This method will check all loaded mods for an asset with the specified name.
The name of the asset to load
The loaded asset or null if the asset was not found
Attempts to load an asset from a loaded mod and return the value as the specified generic type.
This method will check all loaded mods for an asset with the specified name.
The generic type to return the asset as
The name of the asset to load
The loaded asset as the specified generic type or null if the asset was not found
Attempts to load an asset from a loaded mod asynchronously.
This method will check all loaded mods for an asset with the specified name.
The name or path of the asset to load
A yieldable object containting load progress information
Attempts to load an asset from a loaded mod asynchronously and return the result as the specified generic type.
This method will check all loaded mods for an asset with the specified name.
The generic type to return the asset as
The name or path of the asset to load
A yieldable object containgin load progress information
The mod behaviour class is a substitue for the mono behaviour class that provides additional information to the
developer.
By default all public members of the inheriting class will be exposed to modders.
The developer must inherit from this class if they want to support inheritance.
Returns true if a valid host exists in the scene and currently has a mod loaded.
Returns an array of mod hosts that are currently in the scene.
Returns a reference to the active instance in the scene. Always the first host created.
Event method triggered when a mod host has successfully loaded a mod.
This method provides the same callback behaviour as subscribing to the
event.
Event method triggered when a mod host has successfully un-loaded a mod.
This method provides the same callback behaviour as subscribing to the event.
Allows the developer to trigger a callback that inheriting mod classes may listen for.
Works in a similar way to the 'SendMessage' method of Unity except that only mod classes inheriting from this class
can be triggered.
An example would be triggering a damage message to indicate to modders that this object is taking damage.
The name of the method to trigger
Allows the developer to trigger a callback that inheriting mod classes may listen for.
Works in a similar way to the 'SendMessage' method of Unity except that only mod classes inheriting from this class
can be triggered.
This overload allows a single argument to be passed.
An example would be triggering a damage message to indicate to modders that this object is taking damage.
The name of the method to trigger
A value to pass as an argument. Referenced Unity types are allowed
Allows the developer to trigger a callback that inheriting mod classes may listen for.
Works in a similar way to the 'SendMessage' method of Unity except that only mod classes inheriting from this class
can be triggered.
This overload allows an undefined number of arguments to be passed.
An example would be triggering a damage message to indicate to modders that this object is taking damage.
The name of the method to trigger
A params list of arguiments to pass to the method, Referenced Unity types are allowed
Allows the developer to trigger an event that mod classes may listen to.
Works in a similar way to the 'SendMessage' method of Unity.
An example would be triggering a game over message to inform the mod that the game has ended.
The name of the method to trigger
Allows the developer to trigger an event that mod classes may listen to.
Works in a similar way to the 'SendMessage' method of Unity.
This overload allows a single value to be passed as an argument.
An example would be triggering a game over message to inform the mod that the game has ended.
The name of the method to trigger
A value to be passed as an argument, Referenced Unity types are allowed
Allows the developer to trigger an event that mod classes may listen to.
Works in a similar way to the 'SendMessage' method of Unity.
This overload allows an any number of values to be passed as arguments, Referenced Unity types are allowed.
An example would be triggering a game over message to inform the mod that the game has ended.
The name of the method to trigger
A param list of arguments to pass to the method, Referenced Unity types are allowed
Responsible for accessing and parsing the applications command line in order to locate the specified command line
token.
Allows support for command line launching from the UMod Exporter for quick mod testing.
Returns true if the command line contains any mod paths;
This property may result in the command line being parsed automatically.
Attempts to access a single mod path from the command line if one exists.
This property will always return the first found path within the command line and any other paths will be ignored.
This property may result in the command line being parsed automatically.
Attempts to enumerate all paths found in the command line.
This property may result in the command line being parsed automatically.
This event is called when the command line is being parsed and detects a mod path.
The mod path is passed to this delegate and can then be loaded.
Begins parsing the application command line as provided by to find any
mod paths specified for loading.
This method may result in the event being triggered if any mod paths are found.
Attempts to parse a user provided string to find any mod paths specified for loading.
This method may result in the event being triggered if any mod paths are found.
A user string to parse, typically the command line string
Attempts to access the command line string generated by the application and combines it into a single space
separated string.
When true, the application startup path that is always present in the command line will
be excluded from the result
A string value representing the applications command line
Used to indicate the current loading state of the mod host
No loading is occuring.
One or more files are currenlty being downloaded from a remote server.
The specified files are loading.
The load operation has completed.
Used to indicate the type of error that occurred while loading a mod
The mod loaded without error.
An unknown error occurred during loading that prevented the mod from runnning.
An error occirred while attempting to retrieve files from the local file system, Usually an IO excption.
An error occurred while attempting to retrieve files from a remote server.
The mod failed to load because required files are missing or corrupt.
The mod failed to load because the specified path does not point to a valid mod folder structre.
The mod file coould not be found at the path specified.
The mod could not be loaded because it is missing the essential resource file.
One or more of the mod references could not be loaded.
The mod could not be loaded because it was created with a newer version of the uMod Build Engine.
The mod could not be loaded because it targets a different game.
The mod could not be loaded because it was created with a different version of Unity.
The mod could not be loaded because it breaches the security policy imposed by the host.
The main mod component that provides access to loading and running a user created mod.
This event is triggered just before a mod is about to be unloaded.
This allows you to perform cleanup tasks or similar before the mod is destroyed.
Only triggered when the host actually has a mod loaded.
This event is triggered after a host has unloaded an existing mod from memory.
Only triggered when the host actually has a mod loaded.
Returns true if this mod host has been activated.
Activation causes the mod content to be initialized. Without activation, the content is not accessible.
When true, existing mod hosts that are in an idle state (Unloaded and not loading) may be reclaimed for reuse by
another mod load.
Calls to or may result in host reclaims.
By default, this value is true.
Returns true if the current loaded mod contains any scenes.
The mod host does not have a mod loaded. Use to check if a mod is loaded before accessing the property
Returns true if the current loaded mod contains any prefab assets.
The mod host does not have a mod loaded. Use to check if a mod is loaded before accessing the property
Returns true if the current loaded mod contains any code assets.
Code assets can be in the form of C# scripts or managed assemblies and both will be treated as 'Scripts'
The mod host does not have a mod loaded. Use to check if a mod is loaded before accessing the property
Returns true if the current mod is dependant upon any other mods.
The mod host does not have a mod loaded. Use to check if a mod is loaded before accessing the property
Returns the current mod path representing the loaded mod location as specified in the method.
If no mod is loaded then the return value will be null.
Note that the mod path may be set before the host has actually loaded the mod so it is reccommended that you also check
Returns the interface for the the current mod allowing access to values such as mod name and version.
Thrown when the property is accessed but a mod is not currently loaded
Get and array of that the current mod references.
Get an array of that this host is dependant upon in order to function correclty.
This array will only be populated once this host has finished loading its hosted mod.
Returns an instance of the y class representing the current loaded mod or null if no mod is loaded.
Thrown when the property is accessed but a mod is not currently loaded
Returns the interface for the current mod allowing asset loaading from the mod via the host.
The host does not have a valid mod loaded
The host has a valid mod loaded but it has not yet been activated. Mod assets will not be available until activation is completed
Returns the interface for the current mod allowing shared asset loading from the mod via the host.
Shared assets include all referenced mod assets reccursivley as well as this mods assets.
The host does not have a valid mod loaded
The host has a valid mod loaded but it has not yet been activated. Mod assets will not be available until activation is completed
Returns the interface for the current mod allowing scene loading from the mod via the host.
The host does not have a valid mod loaded
The host has a valid mod loaded but it has not yet been activated. Mod scenes will not be available until activation is completed
Returns the interface for the current mod allowing scene loading from the mod via the host.
Shared scenes include all referenced mod scenes reccursivley as well as this mods scenes.
The host does not have a valid mod loaded
The host has a valid mod loaded but it has not yet been activated. Mod scenes will not be available until activation is completed
Returns the for the current mod and can be used to log useful debug messages.
Access the script domain for this mod.
If the host does not have a mod loaded then the return value will be null.
The host does not have a valid mod loaded
The host has a valid mod loaded but it has not yet been activated. The mod script domain will not be available until activation is completed
Returns an array of references to all mod hosts currently in the scene regardless of their load state.
Called by Unity.
Called by Unity.
Destroys all active game objects that have been created by this mod.
This may be called automatically as a result of calling depending upon the value of .
This method needs the mod to be loaded in order to succeed. If the mod has been unloaded and this method is called then it will fail silently.
Attempts to unload the mod owned by this host.
If the host does not have a mod loaded then no action is taken.
Attempts to unload the mod owned by this host. Depending on settings this may cause all mod related game objects to
also be destroyed.
If the host does not have a mod loaded then no action is taken.
When true, the host owning the mod will also be destroyed otherwise it will remain in the
scene for re-use
Activates all mod content.
All mod asset and scene information will become available.
The default scene may be loaded depending upon the mod settings.
All mod entry point scripts will be security checked, initialized and executed.
Static methods that provides a quick and simple method of creating a new mod host component in the scene.
The method will create associated game objects and dependant components automatically to ensure that the created
host is valid.
A reference to a newly created class
Returns true if any mod host currently has the specified mod loaded.
This method is used to avoid shared memory corruption which orrurs when the shared mod data is accessed by 2 different mod hosts.
The mod path to check for
True if the mod path is loaded by any existing mod host
Returns the for the last load attempt.
Get the current for this mod host.
This value will only be used when is true.
Returns true if this mod host currently has a mod loaded otherwise returns false.
Returns true if this mod host is currently loading a mod otherwise returns false.
Returns true if this mod host is currently downloading from a remote server or reading from the local file system.
Represents a single asset item containing a lookup name and Object reference.
The name assigned by the developer and used for lookup.
The actual value of the object.
Default constructor.
Parameter constructor
The Object reference assigned to the data. The lookup name will be generated from this reference
Responsible to maintaining and managing settings related to compiled mod assets.
Can game assets be used by mods.
Materials that mods can access.
Prefabs that mods can access.
The that should occur when one or more mods with the same target moddable content are loaded.
The that should occur when the mod owning the moddable content is about to be unloaded.
When enabled, mod assets can append array indexing syntax '[...]' to the end of thier file names in order to indicate that a certain asset should be assigned to the specified index.
This can be useful for material and texture assets where more that one asset could be assinged to a single object.
When enabled, any moddable content that was applied via this component will be reverted to the original asset when the component is destroyed.
No runtime code validation will be performed. This could allow potentially unsafe code to run.
Only runtime code that has not been validated when building the mod will be checked. This may offer better load performance as the validation checks are performed at build time.
Note that any code that was not checked at build time or has an invalid security hash will be validated at runtime.
All mod code will be validated prior to loading regardless of whether it was valdiated at build time.
The global settings used by all mod hosts.
Can mods be loaded from the command line.
The variable used when launching mods from the command line.
Is the modder allowed to load assets from the mod (Prefabs).
Is the modder allowed to request scene changes.
Should mod scenes be loaded automatically when a mod is loaded. Not recommended when multiple mods are used.
Should mods created with older versions of Unity be loadable by the standalone game.
Note that there may be issues when loading mods created by older Unity version such as material or shader errors.
We always recommend that this option is disabled however you can enable it if you understand there may be potential issues.
Should the host cleanup all objects it created when its associated mod is unloaded.
The current log level defining the amount of detail that is logged to the console.
The maximum number of bytes per resource that uMod will allow in memory per host.
If this amount is exceeded then uMod will download remote files to the file system and then stream the data from file.
When true, uMod will locate mod scripts that are private, protected or internal.
When true, uMod will locate members in mod scripts that are private, protected or internal.
Should script find methods use case sensitive names.
The security restrictions used to validate mod code.
Represents the download unit used by the download speed.
Represents a download speed measured in bytes per second.
Represents a download speed measured in kilo bytes per second.
Represents a download speed measured in mega bytes per second.
Represents a download speed value.
Represents a donwload speed of 0 Bytes per second.
The current unit of measurement used by this download speed.
The current speed represented by this instance.
The measurment unit depends on
Additional equals.
The object to compare against
True if the objects are equal
Get the current downlaod speed as a string value.
A string representation of this download speed
Get the current downlod speed as a string value.
When true, the download speed will include the measurement unit
A string representation of this download speed
Overriden hash code.
Hash code for the current download speed
Overriden equals.
The object to compare against
True if the objects are considered equal
Get a string value representing the current units used by the download speed.
See also
The unit to convert
A string representation of the specified
Resets all measue data so that new measures can be taken from the current time.
Get the for the downloaded data based on the last measure time.
The number of bytes that were processed during the time passed
A representing the transfer speed of the data
Get the average for the downloaded data based on the last measure time.
The number of bytes that were processed during the time passed
A representing the average transfer speed of the data
Convert the specified number of bytes to a representing the transfer rate per second.
The number of bytes that were transferred per second
A representing the transfer speed per second
Used to access the current version of uMod.
The major version for uMod.
The minor verison for uMod.
The revision version for uMod.