uLua v3.0.0
A Lua Modding Framework for Unity.
uLua.Packages.LuaAssetBundle Class Reference

A Lua-friendly wrapper for Unity's AssetBundle. More...

Public Member Functions

 LuaAssetBundle (AssetBundle bundle)
 Constructor. This is the main way to initialise a LuaAssetBundle object.
 
string[] GetAllAssetNames ()
 Returns all asset names in the bundle.
 
bool Contains (string name)
 Checks if the bundle contains an asset with the given name.
 
Object LoadAsset (string name)
 Loads an asset from the bundle by name.
 
Texture2D LoadTexture (string name)
 Loads a texture from the bundle by name.
 
AudioClip LoadAudio (string name)
 Loads an audio clip from the bundle by name.
 
Sprite LoadSprite (string name)
 Loads a sprite from the bundle by name.
 
TextAsset LoadTextAsset (string name)
 Loads a text asset from the bundle by name.
 
void Unload (bool unloadAll)
 Unload files from the asset bundle.
 

Detailed Description

A Lua-friendly wrapper for Unity's AssetBundle.

This class provides synchronous and strong typed methods for working with AssetBundles.