Class WeaverAssets
Used for getting assets/resources from the WeaverCore Bundle
Namespace: WeaverCore.Utilities
Assembly: WeaverCore.dll
Syntax
public static class WeaverAssets
Fields
| Edit this page View SourceWeaverAssetBundleName
Declaration
public static readonly string WeaverAssetBundleName
Field Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceAllBundles()
Gets the names of all the loaded WeaverCore Asset Bundles
Declaration
public static IEnumerable<string> AllBundles()
Returns
Type | Description |
---|---|
IEnumerable<string> |
LoadAssetFromBundle<T>(string, string)
Loads a Asset from a WeaverCore Asset Bundle
Declaration
public static T LoadAssetFromBundle<T>(string bundleName, string name) where T : Object
Parameters
Type | Name | Description |
---|---|---|
string | bundleName | The bundle to load from |
string | name | The name of the asset to load |
Returns
Type | Description |
---|---|
T | Returns the loaded asset, or null of the asset wasn't found |
Type Parameters
Name | Description |
---|---|
T | The type of asset to load |
LoadAssetFromBundle<T>(Type, string)
Loads an asset from a mod bundle
Declaration
public static T LoadAssetFromBundle<T>(Type modType, string name) where T : Object
Parameters
Type | Name | Description |
---|---|---|
Type | modType | The mod to load the bundle from |
string | name | The name of the asset to load |
Returns
Type | Description |
---|---|
T | Returns the loaded asset, or null of the asset wasn't found |
Type Parameters
Name | Description |
---|---|
T | The type of asset to load |
LoadAssetFromBundle<T, ModType>(string)
Loads an asset from a mod bundle
Declaration
public static T LoadAssetFromBundle<T, ModType>(string name) where T : Object
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the asset to load |
Returns
Type | Description |
---|---|
T | Returns the loaded asset, or null of the asset wasn't found |
Type Parameters
Name | Description |
---|---|
T | The type of asset to load |
ModType | The mod to load the bundle from |
LoadAssetsFromBundle<T>(string, string)
Loads weaver assets with the same name from a bundle
Declaration
public static IEnumerable<T> LoadAssetsFromBundle<T>(string bundleName, string name) where T : Object
Parameters
Type | Name | Description |
---|---|---|
string | bundleName | The bundle to load from |
string | name | The name of the assets to load |
Returns
Type | Description |
---|---|
IEnumerable<T> | Returns the loaded assets |
Type Parameters
Name | Description |
---|---|
T | The type of assets to load |
LoadAssetsFromBundle<T>(Type, string)
Loads weaver assets with the same name from a bundle
Declaration
public static IEnumerable<T> LoadAssetsFromBundle<T>(Type modType, string name) where T : Object
Parameters
Type | Name | Description |
---|---|---|
Type | modType | The mod to load the bundle from |
string | name | ThThe name of the assets to load |
Returns
Type | Description |
---|---|
IEnumerable<T> | Returns the loaded assets |
Type Parameters
Name | Description |
---|---|
T | The type of asset to load |
LoadAssetsFromBundle<T, ModType>(string)
Loads weaver assets with the same name from a bundle
Declaration
public static IEnumerable<T> LoadAssetsFromBundle<T, ModType>(string name) where T : Object
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the assets to load |
Returns
Type | Description |
---|---|
IEnumerable<T> | Returns the loaded assets |
Type Parameters
Name | Description |
---|---|
T | The type of asset to load |
ModType | The mod to load the bundle from |
LoadWeaverAsset<T>(string)
Loads a Asset from a WeaverCore Asset Bundle
Declaration
public static T LoadWeaverAsset<T>(string name) where T : Object
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the asset to load |
Returns
Type | Description |
---|---|
T | Returns the loaded asset, or null of the asset wasn't found |
Type Parameters
Name | Description |
---|---|
T | The type of asset to load |
LoadWeaverAssets<T>(string)
Loads weaver assets with the same name in the WeaverCore Bundle
Declaration
public static IEnumerable<T> LoadWeaverAssets<T>(string name) where T : Object
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the asset to load |
Returns
Type | Description |
---|---|
IEnumerable<T> | Returns a list of loaded assets |
Type Parameters
Name | Description |
---|---|
T | The type of asset to load |