2.4.3版本,按照官方文档,加载成功,但有个缓存的疑问:
cc.assetManager.assets
可以找到.png 文件,但是找不到.skel,.atlas文件,
这样的情况下,怎么样才能找到.skel,.atlas文件
对应的释放又应该怎么释放
cc.assetManager.releaseAsset(xx.skeletonData)的方式不行
求大佬们指点
官方那个代码如下:
var spineNode = new cc.Node();
var skeleton = spineNode.addComponent(sp.Skeleton);
this.node.addChild(spineNode);
var image = “http://localhost/download/spineres/1/1.png”;
var ske = “http://localhost/download/spineres/1/1.skel”;
var atlas = “http://localhost/download/spineres/1/1.atlas”;
cc.assetManager.loadAny([{ url: atlas, ext: ‘.txt’ }, { url: ske, ext: ‘.bin’ }], (error, assets) => {
cc.assetManager.loadRemote(image, (error, texture) => {
var asset = new sp.SkeletonData();
asset._nativeAsset = assets[1];
asset.atlasText = assets[0];
asset.textures = [texture];
asset.textureNames = [‘1.png’];
skeleton.skeletonData = asset;
});
});
