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
bundleNamestringThe name of the embedded AssetBundle resource.
objectNamestringThe name of the asset to load within the AssetBundle.
Returns
- T
The loaded asset of type
T.
Type Parameters
TThe 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
bundleNamestringThe name of the embedded AssetBundle resource.
objectNamestringThe name of the asset to load within the AssetBundle.
bundleWrappedAssetBundleThe output parameter containing the loaded WrappedAssetBundle.
Returns
- T
The loaded asset of type
T.
Type Parameters
TThe 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
bundleNamestringThe name of the embedded AssetBundle resource.
objectNamestringThe name of the asset to load within the AssetBundle.
assemblyOverrideAssemblyThe assembly from which to load the embedded AssetBundle resource.
Returns
- T
The loaded asset of type
T.
Type Parameters
TThe 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
bundleNamestringThe name of the embedded AssetBundle resource.
objectNamestringThe name of the asset to load within the AssetBundle.
assemblyOverrideAssemblyThe assembly from which to load the embedded AssetBundle resource.
bundleWrappedAssetBundleThe output parameter containing the loaded WrappedAssetBundle.
Returns
- T
The loaded asset of type
T.
Type Parameters
TThe 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
fullResourceNamestringThe full embedded resource name (including namespace path);
overrideAssemblyAssemblyThe assembly to load the embedded resource from.
Returns
- WrappedAssetBundle
The loaded AssetBundle instance