Skip to content

Commit

Permalink
Fix test-case can not run normally due to access private field (#17826)
Browse files Browse the repository at this point in the history
  • Loading branch information
bofeng-song authored Nov 8, 2024
1 parent e4bf2e1 commit dd7ff20
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions cocos/asset/asset-manager/downloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,13 @@ export class Downloader {
this.remoteBundles = remoteBundles;
}

/**
* @engineInternal
*/
public get handlers (): Record<string, DownloadHandler> {
return this._downloaders$;
}

/**
* @en
* Register custom handler if you want to change default behavior or extend downloader to download other format file.
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit dd7ff20

Please sign in to comment.