ModdableContent Class |
Namespace: UMod.Moddable
public class ModdableContent : MonoBehaviour
The ModdableContent type exposes the following members.
Name | Description | |
---|---|---|
ModdableContent | Initializes a new instance of the ModdableContent class |
Name | Description | |
---|---|---|
AllowAssetIndexing |
Return a value indicating whether asset indexing is allowed for this component based on moddableSettings value.
When in editor mode (Not playing), this property will always return the value of allowAssetIndexing.
| |
ConflictBehaviour |
Return the conflict behaviour for this component based on moddableSettings value.
When in editor mode (Not playing), this property will always return the value of conflictBehaviour.
| |
NamingSchemeOverride | ||
ObjectReference |
The ModdableObjectReference that uniquley identifies the parent gamne object in the moddable naming scheme.
| |
RevertContentOnDestroy |
Return a value indicating whether modded content should be reverted to default for this component when it is destroyed base on moddableSettings value.
When in editor mode (Not playing), this property will always return the value of revertContentOnDestroy.
| |
UnloadBehaviour |
Return the unload behaviour for this component based on moddableSettings value.
When in editor mode (Not playing), this proeprty will always return the value of unloadBehaviour.
|
Name | Description | |
---|---|---|
AddToNamingScheme | ||
ApplyModdableContent |
Attempt to apply moddable content from any loaded mods with matching mod content.
Conflicts will be handled based on the ConflictBehaviour value.
| |
ApplyModdableContent(ModHost) |
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 ConflictBehaviour value.
| |
Awake |
Called by Unity.
| |
GetAllAppliedContent |
Return an array of all applied moddable content.
| |
GetAppliedContent |
Return the first applied moddable content for the target component or null if no moddable content has been applied.
| |
GetAppliedContentWithIndex | ||
GetInitialComponentContent |
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.
| |
GetOrCreateModdableReferenceForObject |
Get or create a unique ModdableObjectReference that identifies the specified game object in the moddable asset naming scheme.
| |
OnDestroy |
Called by Unity.
| |
OnModLoaded |
Called when a new mod has been loaded by uMod.
| |
OnModWillUnload |
Called when then owning mod host is about to be unloaded.
| |
OnValidate |
Called by Unity editor.
| |
OnWillReplaceContent |
Called when the target component will have its asset content modded.
| |
OnWillRevertContent |
Called when the target component will have its asset reverted to default.
| |
RemoveFromNamingScheme | ||
Reset |
Called by Unity editor.
| |
RevertModdableContent |
Attempt to revert any applied moddable content to use the original game assets.
| |
Start |
Called by Unity.
|
Name | Description | |
---|---|---|
allowAssetIndexing |
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.
| |
assetType |
The ModdableContentModdableAssetType 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.
| |
autoApplyContent |
When enabled, the moddable content will automatically be applied when the scene is loaded or when a new mod is loaded.
| |
conflictBehaviour |
The ModdableContentModdableConflictBehaviour that should occur when one or more mods with the same target moddable content are loaded.
| |
loadContentAsync |
When enabled, all content loading will be performed asynchronously to prevent blocking the main thread.
| |
moddableSettings |
Detemrines whether this component will use the global settings for moddable behaviour of use custom settings as defined on the component.
| |
revertContentOnDestroy |
When enabled, any moddable content that was applied via this component will be reverted to the original asset when the component is destroyed.
| |
targetModdableComponent |
The target component that can be modified.
The specified component must be compatible with the target asset type.
| |
unloadBehaviour |