- Developed by Dented Pixel
API Docs for: LeanLoader 0.2
Show:

LeanLoader Class

Defined in: LeanLoader.cs:730

Load assets from the web and cache them for faster performance and offline use

Constructor

LeanLoader

()

Defined in LeanLoader.cs:730

Methods

LeanLoader.deleteCache

(
  • dataURL:String
)

Defined in LeanLoader.cs:810

Remove a specific cached item

Parameters:

  • dataURL:String String

    The path of the asset you want to delete from the cache

LeanLoader.deleteCacheAll

()

Defined in LeanLoader.cs:823

Removes all of the LeanLoader cached items from the PlayerPrefs

LeanLoader.load

(
  • dataURL:String
  • options:LLOptions
)
LeanLoading

Defined in LeanLoader.cs:837

Load an asset from the internet

Parameters:

  • dataURL:String String

    URL of the data you wish to load

  • options:LLOptions LLOptions

    The optional parameters you wish to specify for the loading of the asset (use caching, onComplete handlers, etc...)

Returns:

LeanLoading:

Returns a LeanLoading object where you can track the assets progress, and other attributes

Example:

Javascript:
LeanLoader.load("http://dentedpixel.com/assets/Monkeyshines.png", LLOptions().setOnComplete( imageLoaded ).setUseCache( true )); function imageLoaded( tex:Texture2D ){
Debug.Log("image loaded:"+tex);
}


C#:
LeanLoader.load("http://dentedpixel.com/assets/Monkeyshines.png", new LLOptions().setOnComplete( imageLoaded ).setUseCache( true )); void imageLoaded( Texture2D tex ){
Debug.Log("image loaded:"+tex);
}