egret error loading resources

1. The new version of the resources required to load asynchronously

 

Code: 

1  // add the resource asynchronous method 
2      Private  the async loadResource () {
 . 3          the try {
 . 4              the await RES.loadConfig ( " Resource / default.res.json " , " Resource / " );
 . 5              the await RES.loadGroup ( " Button " ) ;
 . 6          }
 . 7          the catch (E) {
 . 8              console.error (E);
 . 9          }
 10      }

 

Guess you like

Origin www.cnblogs.com/vali/p/12329206.html