loader 类型

模块: cc

废弃: cc.loader is deprecated, please backup your project and upgrade to cc.assetManager

cc.loader is deprecated, please backup your project and upgrade to AssetManager

索引

属性(properties)
  • onProgress Unknown cc.loader.onProgress is deprecated, please transfer onProgress to API as a parameter
  • assetLoader Object cc.loader.assetLoader was removed, assetLoader and md5Pipe were merged into transformPipeline
  • md5Pipe Object cc.loader.md5Pipe is deprecated, assetLoader and md5Pipe were merged into transformPipeline
  • downloader Object cc.loader.downloader is deprecated, please use downloader instead
  • loader Object cc.loader.loader is deprecated, please use parser instead
方法
  • load cc.loader.load is deprecated, please use loadAny instead
  • getXMLHttpRequest cc.loader.getXMLHttpRequest is deprecated, please use XMLHttpRequest directly
  • getItem cc.loader.getItem is deprecated, please use cc.assetManager.asset.get instead
  • loadRes cc.loader.loadRes is deprecated, please use load instead
  • loadResArray cc.loader.loadResArray is deprecated, please use load instead
  • loadResDir cc.loader.loadResDir is deprecated, please use loadDir instead
  • getRes cc.loader.getRes is deprecated, please use get instead
  • getDependsRecursively cc.loader.getDependsRecursively is deprecated, please use use DependUtil/getDepsRecursively:method instead
  • addDownloadHandlers cc.loader.addDownloadHandlers is deprecated, please use cc.assetManager.downloader.register instead
  • addLoadHandlers cc.loader.addLoadHandlers is deprecated, please use cc.assetManager.parser.register instead
  • release cc.loader.release is deprecated, please use releaseAsset instead
  • releaseAsset cc.loader.releaseAsset is deprecated, please use releaseAsset instead
  • releaseRes cc.loader.releaseRes is deprecated, please use AssetManager/releaseRes:method instead
  • releaseResDir cc.loader.releaseResDir was removed, please use AssetManager/releaseRes:method instead
  • releaseAll cc.loader.releaseAll is deprecated, please use releaseAll instead
  • removeItem cc.loader.removeItem is deprecated, please use cc.assetManager.assets.remove instead
  • setAutoRelease cc.loader.setAutoRelease is deprecated, if you want to prevent some asset from auto releasing, please use addRef instead
  • setAutoReleaseRecursively cc.loader.setAutoReleaseRecursively is deprecated, if you want to prevent some asset from auto releasing, please use addRef instead
  • isAutoRelease cc.loader.isAutoRelease is deprecated

Details

属性(properties)

onProgress

cc.loader.onProgress is deprecated, please transfer onProgress to API as a parameter

meta description
类型 Unknown
定义于 cocos2d/core/asset-manager/deprecated.js:86
废弃(Deprecated) cc.loader.onProgress is deprecated, please transfer onProgress to API as a parameter
assetLoader

cc.loader.assetLoader was removed, assetLoader and md5Pipe were merged into transformPipeline

meta description
类型 Object
定义于 cocos2d/core/asset-manager/deprecated.js:355
废弃(Deprecated) cc.loader.assetLoader was removed, assetLoader and md5Pipe were merged into cc.assetManager.transformPipeline
md5Pipe

cc.loader.md5Pipe is deprecated, assetLoader and md5Pipe were merged into transformPipeline

meta description
类型 Object
定义于 cocos2d/core/asset-manager/deprecated.js:368
废弃(Deprecated) cc.loader.md5Pipe is deprecated, assetLoader and md5Pipe were merged into cc.assetManager.transformPipeline
downloader

cc.loader.downloader is deprecated, please use downloader instead

meta description
类型 Object
定义于 cocos2d/core/asset-manager/deprecated.js:379
废弃(Deprecated) cc.loader.downloader is deprecated, please use cc.assetManager.downloader instead
loader

cc.loader.loader is deprecated, please use parser instead

meta description
类型 Object
定义于 cocos2d/core/asset-manager/deprecated.js:390
废弃(Deprecated) cc.loader.loader is deprecated, please use cc.assetManager.parser instead

方法

load

cc.loader.load is deprecated, please use loadAny instead

meta description
定义于 cocos2d/core/asset-manager/deprecated.js:98
废弃(Deprecated) cc.loader.load is deprecated, please use cc.assetManager.loadAny instead
参数列表
  • resources String | String[] | Object Url list in an array
  • progressCallback Function Callback invoked when progression change
    • completedCount Number The number of the items that are already completed
    • totalCount Number The total number of the items
    • item Object The latest item which flow out the pipeline
  • completeCallback Function Callback invoked when all resources loaded
getXMLHttpRequest

cc.loader.getXMLHttpRequest is deprecated, please use XMLHttpRequest directly

meta description
返回 XMLHttpRequest
定义于 cocos2d/core/asset-manager/deprecated.js:187
废弃(Deprecated) cc.loader.getXMLHttpRequest is deprecated, please use XMLHttpRequest directly
getItem

cc.loader.getItem is deprecated, please use cc.assetManager.asset.get instead

meta description
返回 Object
定义于 cocos2d/core/asset-manager/deprecated.js:200
废弃(Deprecated) cc.loader.getItem is deprecated, please use cc.assetManager.assets.get instead
参数列表
  • id Object The id of the item
loadRes

cc.loader.loadRes is deprecated, please use load instead

meta description
定义于 cocos2d/core/asset-manager/deprecated.js:212
废弃(Deprecated) cc.loader.loadRes is deprecated, please use cc.resources.load instead
参数列表
  • url String Url of the target resource.
                    The url is relative to the "resources" folder, extensions must be omitted.
    
  • type Function Only asset of type will be loaded if this argument is supplied.
  • progressCallback Function Callback invoked when progression change.
    • completedCount Number The number of the items that are already completed.
    • totalCount Number The total number of the items.
    • item Object The latest item which flow out the pipeline.
  • completeCallback Function Callback invoked when the resource loaded.
    • error Error The error info or null if loaded successfully.
    • resource Object The loaded resource if it can be found otherwise returns null.
loadResArray

cc.loader.loadResArray is deprecated, please use load instead

meta description
定义于 cocos2d/core/asset-manager/deprecated.js:246
废弃(Deprecated) cc.loader.loadResArray is deprecated, please use cc.resources.load instead
参数列表
  • urls String[] Array of URLs of the target resource.
                       The url is relative to the "resources" folder, extensions must be omitted.
    
  • type Function Only asset of type will be loaded if this argument is supplied.
  • progressCallback Function Callback invoked when progression change.
    • completedCount Number The number of the items that are already completed.
    • totalCount Number The total number of the items.
    • item Object The latest item which flow out the pipeline.
  • completeCallback Function A callback which is called when all assets have been loaded, or an error occurs.
    • error Error If one of the asset failed, the complete callback is immediately called
                                    with the error. If all assets are loaded successfully, error will be null.
      
    • assets Asset[] | Array An array of all loaded assets.
                                                If nothing to load, assets will be an empty array.
      
loadResDir

cc.loader.loadResDir is deprecated, please use loadDir instead

meta description
定义于 cocos2d/core/asset-manager/deprecated.js:284
废弃(Deprecated) cc.loader.loadResDir is deprecated, please use cc.resources.loadDir instead
参数列表
  • url String Url of the target folder.
                    The url is relative to the "resources" folder, extensions must be omitted.
    
  • type Function Only asset of type will be loaded if this argument is supplied.
  • progressCallback Function Callback invoked when progression change.
    • completedCount Number The number of the items that are already completed.
    • totalCount Number The total number of the items.
    • item Object The latest item which flow out the pipeline.
  • completeCallback Function A callback which is called when all assets have been loaded, or an error occurs.
    • error Error If one of the asset failed, the complete callback is immediately called
                                    with the error. If all assets are loaded successfully, error will be null.
      
    • assets Asset[] | Array An array of all loaded assets.
                                        If nothing to load, assets will be an empty array.
      
    • urls String[] An array that lists all the URLs of loaded assets.
getRes

cc.loader.getRes is deprecated, please use get instead

meta description
返回 Any
定义于 cocos2d/core/asset-manager/deprecated.js:325
废弃(Deprecated) cc.loader.getRes is deprecated, please use cc.resources.get instead
参数列表
  • url String
  • type Function Only asset of type will be returned if this argument is supplied.
getDependsRecursively

cc.loader.getDependsRecursively is deprecated, please use use DependUtil/getDepsRecursively:method instead

meta description
返回 Array
定义于 cocos2d/core/asset-manager/deprecated.js:342
废弃(Deprecated) cc.loader.getDependsRecursively is deprecated, please use use cc.assetManager.dependUtil.getDepsRecursively instead
参数列表
  • owner Asset | String The owner asset or the resource url or the asset's uuid
addDownloadHandlers

cc.loader.addDownloadHandlers is deprecated, please use cc.assetManager.downloader.register instead

meta description
定义于 cocos2d/core/asset-manager/deprecated.js:401
废弃(Deprecated) cc.loader.addDownloadHandlers is deprecated, please use cc.assetManager.downloader.register instead
参数列表
  • extMap Object Custom supported types with corresponded handler
addLoadHandlers

cc.loader.addLoadHandlers is deprecated, please use cc.assetManager.parser.register instead

meta description
定义于 cocos2d/core/asset-manager/deprecated.js:422
废弃(Deprecated) cc.loader.addLoadHandlers is deprecated, please use cc.assetManager.parser.register instead
参数列表
  • extMap Object Custom supported types with corresponded handler
release

cc.loader.release is deprecated, please use releaseAsset instead

meta description
定义于 cocos2d/core/asset-manager/deprecated.js:449
废弃(Deprecated) cc.loader.release is deprecated, please use cc.assetManager.releaseAsset instead
参数列表
releaseAsset

cc.loader.releaseAsset is deprecated, please use releaseAsset instead

meta description
定义于 cocos2d/core/asset-manager/deprecated.js:478
废弃(Deprecated) cc.loader.releaseAsset is deprecated, please use cc.assetManager.releaseAsset instead
参数列表
releaseRes

cc.loader.releaseRes is deprecated, please use AssetManager/releaseRes:method instead

meta description
定义于 cocos2d/core/asset-manager/deprecated.js:489
废弃(Deprecated) cc.loader.releaseRes is deprecated, please use cc.assetManager.releaseRes instead
参数列表
  • url String
  • type Function Only asset of type will be released if this argument is supplied.
releaseResDir

cc.loader.releaseResDir was removed, please use AssetManager/releaseRes:method instead

meta description
定义于 cocos2d/core/asset-manager/deprecated.js:501
废弃(Deprecated) cc.loader.releaseResDir was removed, please use cc.assetManager.releaseRes instead
releaseAll

cc.loader.releaseAll is deprecated, please use releaseAll instead

meta description
定义于 cocos2d/core/asset-manager/deprecated.js:513
废弃(Deprecated) cc.loader.releaseAll is deprecated, please use cc.assetManager.releaseAll instead
removeItem

cc.loader.removeItem is deprecated, please use cc.assetManager.assets.remove instead

meta description
返回 Boolean
定义于 cocos2d/core/asset-manager/deprecated.js:524
废弃(Deprecated) cc.loader.removeItem is deprecated, please use cc.assetManager.assets.remove instead
参数列表
  • id Object The id of the item
setAutoRelease

cc.loader.setAutoRelease is deprecated, if you want to prevent some asset from auto releasing, please use addRef instead

meta description
定义于 cocos2d/core/asset-manager/deprecated.js:536
废弃(Deprecated) cc.loader.setAutoRelease is deprecated, if you want to prevent some asset from auto releasing, please use cc.Asset.addRef instead
参数列表
  • assetOrUrlOrUuid Asset | String asset object or the raw asset's url or uuid
  • autoRelease Boolean indicates whether should release automatically
setAutoReleaseRecursively

cc.loader.setAutoReleaseRecursively is deprecated, if you want to prevent some asset from auto releasing, please use addRef instead

meta description
定义于 cocos2d/core/asset-manager/deprecated.js:549
废弃(Deprecated) cc.loader.setAutoReleaseRecursively is deprecated, if you want to prevent some asset from auto releasing, please use cc.Asset.addRef instead
参数列表
  • assetOrUrlOrUuid Asset | String asset object or the raw asset's url or uuid
  • autoRelease Boolean indicates whether should release automatically
isAutoRelease

cc.loader.isAutoRelease is deprecated

meta description
返回 Boolean
定义于 cocos2d/core/asset-manager/deprecated.js:568
废弃(Deprecated) cc.loader.isAutoRelease is deprecated
参数列表
  • assetOrUrl Asset | String asset object or the raw asset's url

条与 "" 相匹配的结果

    没有与 "" 匹配的结果