change_scene() returns ERR_CANT_LOAD in HTML5 export.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By tx350z

I’m using Godot v3.5.1.stable.official [6fed1ffa3]
Trying to change scenes.

Works fine when run within the Editor. If run as HTML5 from the editor get_tree().change_scene(“res://path_to_tscn”) fails with ERR_CANT_LOAD (error=19).

Also tried exporting to HTML and running from a web server. Same error.

The core code works as I previously had everything in one scene and decided to split the UI into separate scenes.

Any Ideas or suggestions are welcome.

:bust_in_silhouette: Reply From: tx350z

Here is the answer for those that might encounter this same problem stumble across this post.

The problem was the HTML5 export config. I had previously changed the “Export Mode” setting to “Export selected resources (and dependencies)” so .txt files will be included in the export.

During refactoring a scene moved to new folder which was not selected in the “Resources to export” tree.

Also be aware the HTML5 export config is used when launching HTML5 from the editor (by clicking small HTML5 logo button on the top right menu).

I am experiencing the same problem, but my Godot export setting is set to export all resources in the project.

zymsbgt | 2023-01-04 02:32