layabox / LayaAir

LayaAir is a fully platform rendering engine with rich 2D/3D rendering capabilities and a mature integrated development platform

Home Page:https://www.layaair.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

请问下如何支持阻塞同步的文件加载?

yangshuang-developer opened this issue · comments

export function loadRes(url:string){ return new Promise(resolve=>{ Laya.loader.load(url, Handler.create(this,()=>{ resolve();})); }); }
async testLoad() { await loadRes(getResPath('monkey0.png'));

这样结果不是同步的,这个有办法吗?