Table of Contents

Class AssetLoader

Namespace
S1API.AssetBundles
Assembly
S1API.dll

The asset bundle manager

public static class AssetLoader
Inheritance
AssetLoader
Inherited Members

Methods

EasyLoad<T>(string, string)

Loads an asset of type T from an embedded AssetBundle using the executing assembly.

public static T EasyLoad<T>(string bundleName, string objectName) where T : Object

Parameters

bundleName string

The name of the embedded AssetBundle resource.

objectName string

The name of the asset to load within the AssetBundle.

Returns

T

The loaded asset of type T.

Type Parameters

T

The type of asset to load (must derive from UnityEngine.Object).

EasyLoad<T>(string, string, out WrappedAssetBundle)

Loads an asset of type T from an embedded AssetBundle using the executing assembly and outputs the loaded bundle.

public static T EasyLoad<T>(string bundleName, string objectName, out WrappedAssetBundle bundle) where T : Object

Parameters

bundleName string

The name of the embedded AssetBundle resource.

objectName string

The name of the asset to load within the AssetBundle.

bundle WrappedAssetBundle

The output parameter containing the loaded WrappedAssetBundle.

Returns

T

The loaded asset of type T.

Type Parameters

T

The type of asset to load (must derive from UnityEngine.Object).

EasyLoad<T>(string, string, Assembly)

Loads an asset of type T from an embedded AssetBundle using a specified assembly.

public static T EasyLoad<T>(string bundleName, string objectName, Assembly assemblyOverride) where T : Object

Parameters

bundleName string

The name of the embedded AssetBundle resource.

objectName string

The name of the asset to load within the AssetBundle.

assemblyOverride Assembly

The assembly from which to load the embedded AssetBundle resource.

Returns

T

The loaded asset of type T.

Type Parameters

T

The type of asset to load (must derive from UnityEngine.Object).

EasyLoad<T>(string, string, Assembly, out WrappedAssetBundle)

Loads an asset of type T from an embedded AssetBundle using a specified assembly and outputs the loaded bundle.

public static T EasyLoad<T>(string bundleName, string objectName, Assembly assemblyOverride, out WrappedAssetBundle bundle) where T : Object

Parameters

bundleName string

The name of the embedded AssetBundle resource.

objectName string

The name of the asset to load within the AssetBundle.

assemblyOverride Assembly

The assembly from which to load the embedded AssetBundle resource.

bundle WrappedAssetBundle

The output parameter containing the loaded WrappedAssetBundle.

Returns

T

The loaded asset of type T.

Type Parameters

T

The type of asset to load (must derive from UnityEngine.Object).

GetAssetBundleFromStream(string, Assembly)

Load a WrappedAssetBundle instance by string resource name.

public static WrappedAssetBundle GetAssetBundleFromStream(string fullResourceName, Assembly overrideAssembly)

Parameters

fullResourceName string

The full embedded resource name (including namespace path);

overrideAssembly Assembly

The assembly to load the embedded resource from.

Returns

WrappedAssetBundle

The loaded AssetBundle instance