onLoad(action: ()=>void): void
Register an event that runs when all assets finished loading.since
v2000.1
const bean = add([ sprite("bean"), ]) // certain assets related data are only available when the game finishes loading onLoad(() => { debug.log(bean.width) })