Hello guys,
I'm new with Godot. I have finished some scenes in new project. After a few days of searching, still can't figure out how to make it work.
First, I tried to build custom template use Scons and it saved 2mb for wasm file, but it's still little big. I used wasm-opt and it can optimize wasm file upto 4mb but i can not use wasm-opt for custom template, i have no idea why, it cause many errors on wasm file of custom template.
Second, Follow this page, you guys said
Loading a .zip file instead of a .pck file as the main pack;
But i can't find any tutorial for how to load zip for main pack. Tried this https://github.com/godotengine/godot/issues/18384
const MAIN_PACK = BASENAME + '.zip';
if (!Engine.isWebGLAvailable()) {
displayFailureNotice("WebGL not available");
} else {
setStatusMode('indeterminate');
engine.setCanvas(canvas);
Promise.all([Engine.init(BASENAME), engine.preloadFile(MAIN_PACK)]).then(() => {
return engine.start('--main-pack', MAIN_PACK);
}).then(() => {
setStatusMode('hidden');
initializing = false;
}, displayFailureNotice);
}
The result return alert note "is .pck file missing?". Do you guys have any example how to load zip for main pack? Thank you!