DependUtil Class

Module: cc.AssetManager

Control asset's dependency list, it is a singleton. All member can be accessed with cc.assetManager.dependUtil

Index

Methods
  • getNativeDep Get asset's native dependency.
  • getDeps Get asset's direct referencing non-native dependency list.
  • getDependsRecursively Get non-native dependency list of the loaded asset, include indirect reference.

Details

Methods

getNativeDep

Get asset's native dependency. For example, Texture's native dependency is image.

meta description
Returns Object
Defined in cocos2d/core/asset-manager/depend-util.js:50
Parameters
Examples
var dep = dependUtil.getNativeDep('fcmR3XADNLgJ1ByKhqcC5Z');
getDeps

Get asset's direct referencing non-native dependency list. For example, Material's non-native dependencies are Texture.

meta description
Returns string[]
Defined in cocos2d/core/asset-manager/depend-util.js:73
Parameters
Examples
var deps = dependUtil.getDeps('fcmR3XADNLgJ1ByKhqcC5Z');
getDependsRecursively

Get non-native dependency list of the loaded asset, include indirect reference. The returned array stores the dependencies with their uuid, after retrieve dependencies,

meta description
Returns string[]
Defined in cocos2d/core/asset-manager/depend-util.js:97
Parameters
  • uuid String The asset's uuid
Examples
var deps = dependUtil.getDepsRecursively('fcmR3XADNLgJ1ByKhqcC5Z');

results matching ""

    No results matching ""