Egret in the resource loading, you can go to a single load. But more is loaded by the resource group.
For example, enter the login screen, the login resource group resource loading. Open the skills panel, load the resource group skills modules.
// load the login module resource group RES.loadGroup ( "the Login"); // login module unload Resource Group RES.destroyRes ( "login");
So Laya is how to load the resource groups?
Laya loaded single resource
Laya.loader.load("res/atlas/anim.atlas");
Laya load multiple resources
Laya.loader.load(["res/atlas/anim.atlas","res/atlas/chat.atlas"]);
Laya set up resource groups
Laya.loader.setGroup("res/atlas/anim.atlas","login"); Laya.loader.setGroup("res/atlas/chat.atlas","login");
Laya load a resource group
Laya.loader.load(Laya.Loader.groupMap["login"]);
Laya offload resource groups
Laya.loader.clearResByGroup("login");
Laya's scene editor will automatically load the required resources of the current scene
Source bin / libs / laya.core.js, when using Scene.open, it will be used as a loading wait showLoadingPage page