Class ModAssetBundle
An asset bundle mod resource.
Some care must be taken when using this class, see the Remarks section for details.
Inheritance
ModAssetBundle
Assembly: Assembly-CSharp.dll
Syntax
public class ModAssetBundle : ModResource
Properties
AssetBundle
Declaration
public AssetBundle AssetBundle { get; }
Property Value
Type |
Description |
UnityEngine.AssetBundle |
|
Error
Declaration
public override string Error { get; }
Property Value
Overrides
HasError
Declaration
public override bool HasError { get; }
Property Value
Overrides
Loaded
Declaration
public override bool Loaded { get; }
Property Value
Overrides
Methods
LoadAsset<T>(Int32)
Returns the asset with the given index from LoadAllAssets, possibly reloading
the bundle.
Use this only when necessary, see the Remarks section of the class
documentation for more details.
Declaration
public T LoadAsset<T>(int index)
where T : Object
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Returns
Type Parameters
LoadAsset<T>(String)
Returns the asset with the given name, possibly reloading the bundle.
Use this only when necessary, see the Remarks section of the class
documentation for more details.
Declaration
public T LoadAsset<T>(string name)
where T : Object
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
Type Parameters
Events
OnLoad
Called when the resource has finished loading.
This is also called if there was an error loading the resource.
If a new handler is added to this and the resource has already
finished loading, it is immediately called.
Declaration
public override event Action OnLoad
Event Type
Overrides
Operators
Implicit(ModAssetBundle to AssetBundle)
Declaration
public static implicit operator AssetBundle(ModAssetBundle bundle)
Parameters
Returns
Type |
Description |
UnityEngine.AssetBundle |
|