Accept non-default main packs in engine.js startGame()
Allows using startGame() with main packs exported as .zip, but also any other custom extension, for example if a web game host does not allow the .pck filename extension.
This commit is contained in:
4
misc/dist/html/default.html
vendored
4
misc/dist/html/default.html
vendored
@ -229,7 +229,7 @@ $GODOT_HEAD_INCLUDE
|
||||
|
||||
(function() {
|
||||
|
||||
const BASENAME = '$GODOT_BASENAME';
|
||||
const MAIN_PACK = '$GODOT_BASENAME.pck';
|
||||
const DEBUG_ENABLED = $GODOT_DEBUG_ENABLED;
|
||||
const INDETERMINATE_STATUS_STEP_MS = 100;
|
||||
|
||||
@ -380,7 +380,7 @@ $GODOT_HEAD_INCLUDE
|
||||
} else {
|
||||
setStatusMode('indeterminate');
|
||||
engine.setCanvas(canvas);
|
||||
engine.startGame(BASENAME + '.pck').then(() => {
|
||||
engine.startGame(MAIN_PACK).then(() => {
|
||||
setStatusMode('hidden');
|
||||
initializing = false;
|
||||
}, displayFailureNotice);
|
||||
|
||||
Reference in New Issue
Block a user