微信小游戏资源超了4m怎么办

0x2CA
Tue, 02 Apr 2019 08:31:58 +0000

/**
!#en
Preloads the scene to reduces loading time. You can call this method at any time you want.
After calling this method, you still need to launch the scene by cc.director.loadScene.
It will be totally fine to call cc.director.loadScene at any time even if the preloading is not
yet finished, the scene will be launched after loaded automatically.
!#zh 预加载场景，你可以在任何时候调用这个方法。
调用完后，你仍然需要通过 cc.director.loadScene 来启动场景，因为这个方法不会执行场景加载操作。
就算预加载还没完成，你也可以直接调用 cc.director.loadScene，加载完成后场景就会启动。
@param sceneName The name of the scene to preload.
@param onProgress callback, will be called when the load progression change.
@param onLoaded callback, will be called after scene loaded.
*/
preloadScene(
sceneName: string,
onProgress?: (
completedCount: number,
totalCount: number,
item: any
) => void,
onLoaded?: (error: Error) => void
): void;

阅读整个主题