diff --git a/cocos/asset/asset-manager/asset-manager.ts b/cocos/asset/asset-manager/asset-manager.ts index e59e71ff836..b84002f1570 100644 --- a/cocos/asset/asset-manager/asset-manager.ts +++ b/cocos/asset/asset-manager/asset-manager.ts @@ -331,6 +331,13 @@ export class AssetManager { private constructor () {} + /** + * @engineInternal + */ + public get files(): Cache { + return this._files$; + } + /** * @engineInternal */ diff --git a/platforms/minigame/common/engine/cache-manager.js b/platforms/minigame/common/engine/cache-manager.js index 86a123a41f1..47963569751 100644 --- a/platforms/minigame/common/engine/cache-manager.js +++ b/platforms/minigame/common/engine/cache-manager.js @@ -191,7 +191,7 @@ const cacheManager = { } for (let i = 0, l = caches.length; i < l; i++) { const cacheKey = `${cc.assetManager.utils.getUuidFromURL(caches[i].originUrl)}@native`; - cc.assetManager._files.remove(cacheKey); + cc.assetManager.files.remove(cacheKey); this.cachedFiles.remove(caches[i].originUrl); } diff --git a/platforms/runtime/common/engine/cache-manager.js b/platforms/runtime/common/engine/cache-manager.js index 678e9fd0d12..bfba43897e4 100644 --- a/platforms/runtime/common/engine/cache-manager.js +++ b/platforms/runtime/common/engine/cache-manager.js @@ -184,7 +184,7 @@ const cacheManager = { } for (let i = 0, l = caches.length; i < l; i++) { const cacheKey = `${cc.assetManager.utils.getUuidFromURL(caches[i].originUrl)}@native`; - cc.assetManager._files.remove(cacheKey); + cc.assetManager.files.remove(cacheKey); this.cachedFiles.remove(caches[i].originUrl); }