Show / Hide Table of Contents

Class WeaverAssets

Used for getting assets/resources from the WeaverCore Bundle

Inheritance
object
WeaverAssets
Namespace: WeaverCore.Utilities
Assembly: WeaverCore.dll
Syntax
public static class WeaverAssets

Fields

| Edit this page View Source

WeaverAssetBundleName

Declaration
public static readonly string WeaverAssetBundleName
Field Value
Type Description
string

Methods

| Edit this page View Source

AllBundles()

Gets the names of all the loaded WeaverCore Asset Bundles

Declaration
public static IEnumerable<string> AllBundles()
Returns
Type Description
IEnumerable<string>
| Edit this page View Source

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

| Edit this page View Source

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

| Edit this page View Source

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

| Edit this page View Source

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

| Edit this page View Source

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

| Edit this page View Source

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

| Edit this page View Source

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

| Edit this page View Source

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

  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾