diff --git a/cocos/asset/asset-manager/downloader.ts b/cocos/asset/asset-manager/downloader.ts index 0f7283bdc91..37cdb97dc3e 100644 --- a/cocos/asset/asset-manager/downloader.ts +++ b/cocos/asset/asset-manager/downloader.ts @@ -347,6 +347,13 @@ export class Downloader { this.remoteBundles = remoteBundles; } + /** + * @engineInternal + */ + public get handlers (): Record { + return this._downloaders$; + } + /** * @en * Register custom handler if you want to change default behavior or extend downloader to download other format file. diff --git a/platforms/minigame/platforms/xiaomi/wrapper/engine/download-ttf.js b/platforms/minigame/platforms/xiaomi/wrapper/engine/download-ttf.js index 84aeb9a4cc2..8c7c3d064c8 100644 --- a/platforms/minigame/platforms/xiaomi/wrapper/engine/download-ttf.js +++ b/platforms/minigame/platforms/xiaomi/wrapper/engine/download-ttf.js @@ -1,5 +1,5 @@ const downloader = cc.assetManager.downloader; -const originalDownloadTTF = downloader._downloaders['.ttf']; +const originalDownloadTTF = downloader.handlers['.ttf']; function downloadTTF (url, options, onComplete) { // can't use cached ttf on Xiaomi platform