Fix issues with starting up the game.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Dorian Pula 2020-12-17 14:02:51 -05:00
parent 4bf15fdd97
commit 58be256f8a
2 changed files with 5 additions and 2 deletions

View File

@ -21,6 +21,10 @@ Godot devs) can be found between the `<!-- Start of Custom Game block -->` and
* [Calling JS from the HTML5 Export][js-from-godot]
* [Using a Custom HTML Shell][custom-html-shell]
* [Custom Fixed Size Shell template][custom-fixed-size-template]
* Some minor tweaks are needed to work the custom shell with Godot 3.2:
* Remove the line: `const EXTRA_ARGS = JSON.parse('$GODOT_ARGS');`
* Update the starting of game engine by removing `EXTRA_ARGS` from `engine.startGame(EXECUTABLE_NAME, MAIN_PACK, EXTRA_ARGS).then(() => {` making it
`engine.startGame(EXECUTABLE_NAME, MAIN_PACK).then(() => {
[demo]: https://games.birch-tree.net/godot-html-js-integration-demo/
[js-from-godot]: https://docs.godotengine.org/en/stable/getting_started/workflow/export/exporting_for_web.html#calling-javascript-from-script

View File

@ -234,7 +234,6 @@ $GODOT_HEAD_INCLUDE
(function() {
const EXECUTABLE_NAME = '$GODOT_BASENAME';
const MAIN_PACK = '$GODOT_BASENAME.pck';
const EXTRA_ARGS = JSON.parse('$GODOT_ARGS');
const DEBUG_ENABLED = $GODOT_DEBUG_ENABLED;
const INDETERMINATE_STATUS_STEP_MS = 100;
@ -381,7 +380,7 @@ $GODOT_HEAD_INCLUDE
} else {
setStatusMode('indeterminate');
engine.setCanvas(canvas);
engine.startGame(EXECUTABLE_NAME, MAIN_PACK, EXTRA_ARGS).then(() => {
engine.startGame(EXECUTABLE_NAME, MAIN_PACK).then(() => {
setStatusMode('hidden');
initializing = false;
}, displayFailureNotice);