请问下如何支持阻塞同步的文件加载? #1363
yangshuang-developer
started this conversation in
General
Replies: 1 comment
-
同步加载在web环境是无法支持的 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
export function loadRes(url:string){ return new Promise(resolve=>{ Laya.loader.load(url, Handler.create(this,()=>{ resolve();})); }); }
async testLoad() { await loadRes(getResPath('monkey0.png'));
这样结果不是同步的,这个有办法吗?
Beta Was this translation helpful? Give feedback.
All reactions