Whether to use image bitmap to load image first. If enabled, images loading will become faster but memory usage will increase.
The collection of asset which is already loaded, you can remove cache with {{#crossLink "AssetManager/releaseAsset:method"}}{{/crossLink}}
The collection of bundle which is already loaded, you can remove cache with {{#crossLink "AssetManager/removeBundle:method"}}{{/crossLink}}
Whether or not cache the loaded asset
Cache manager is a module which controls all caches downloaded from server in non-web platform.
Manage relationship between asset and its dependencies
Manage all downloading task
Fetching pipeline
Whether or not load asset forcely, if it is true, asset will be loaded regardless of error
Manage all packed asset
Manage all parsing task
Normal loading pipeline
The preset of options
Url transformer
Some useful function
The builtin 'main' bundle
The builtin 'resources' bundle
Get the bundle which has been loaded
The name of bundle
Initialize assetManager with options
the configuration
General interface used to load assets with a progression callback and a complete callback. You can achieve almost all
effect you want with combination of requests
and options
.It is highly recommended that you use more simple API,
such as load
, loadDir
etc. Every custom parameter in options
will be distribute to each of requests
. if request
already has same one, the parameter in request will be given priority. Besides, if request has dependencies, options
will distribute to dependencies too. Every custom parameter in requests
will be tranfered to handler of downloader
and parser
as options
. You can register you own handler downloader or parser to collect these custom parameters for some effect.
Reserved Keyword: uuid
, url
, path
, dir
, scene
, type
, priority
, preset
, audioLoadMode
, ext
,
bundle
, onFileProgress
, maxConcurrency
, maxRequestsPerFrame
, maxRetryCount
, version
, xhrResponseType
,
xhrWithCredentials
, xhrMimeType
, xhrTimeout
, xhrHeader
, reloadAsset
, cacheAsset
, cacheEnabled
,
Please DO NOT use these words as custom options!
The request you want to load
Optional parameters
Callback invoked when progression change
Callback invoked when finish loading
load bundle
The name or root path of bundle
Some optional paramter, same like downloader.downloadFile
Callback when bundle loaded or failed
Load remote asset with url, such as audio, image, text and so on.
The url of asset
Some optional parameters
Callback invoked when finish loading
For internal usage.
Load native file of asset, if you check the option 'Async Load Assets', you may need to load native file with this before you use the asset
The asset
Some optional parameters
Callback invoked when finish loading
General interface used to preload assets with a progression callback and a complete callback.It is highly recommended that you use
more simple API, such as preloadRes
, preloadResDir
etc. Everything about preload is just likes cc.assetManager.loadAny
, the
difference is cc.assetManager.preloadAny
will only download asset but not parse asset. You need to invoke cc.assetManager.loadAny(preloadTask)
to finish loading asset
The request you want to preload
Optional parameters
Callback invoked when progression change
Callback invoked when finish preloading
Release all assets. Refer to {{#crossLink "AssetManager/releaseAsset:method"}}{{/crossLink}} for detailed informations.
Release asset and it's dependencies. This method will not only remove the cache of the asset in assetManager, but also clean up its content. For example, if you release a texture, the texture asset and its gl texture data will be freed up. Notice, this method may cause the texture to be unusable, if there are still other nodes use the same texture, they may turn to black and report gl errors.
The asset to be released
Remove this bundle. NOTE: The asset whthin this bundle will not be released automatically, you can call {{#crossLink "Bundle/releaseAll:method"}}{{/crossLink}} manually before remove it if you need
The bundle to be removed
Generated using TypeDoc
This module controls asset's behaviors and information, include loading, releasing etc. it is a singleton All member can be accessed with
cc.assetManager
.