summaryrefslogtreecommitdiffstats
path: root/platform/web/js/engine
diff options
context:
space:
mode:
Diffstat (limited to 'platform/web/js/engine')
-rw-r--r--platform/web/js/engine/config.js4
-rw-r--r--platform/web/js/engine/engine.js4
2 files changed, 7 insertions, 1 deletions
diff --git a/platform/web/js/engine/config.js b/platform/web/js/engine/config.js
index 6a30c253fb..0b6626968e 100644
--- a/platform/web/js/engine/config.js
+++ b/platform/web/js/engine/config.js
@@ -292,7 +292,9 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused-
return {};
},
'locateFile': function (path) {
- if (path.endsWith('.worker.js')) {
+ if (!path.startsWith('godot.')) {
+ return path;
+ } else if (path.endsWith('.worker.js')) {
return `${loadPath}.worker.js`;
} else if (path.endsWith('.audio.worklet.js')) {
return `${loadPath}.audio.worklet.js`;
diff --git a/platform/web/js/engine/engine.js b/platform/web/js/engine/engine.js
index fb80bd55e1..3d6720a2fc 100644
--- a/platform/web/js/engine/engine.js
+++ b/platform/web/js/engine/engine.js
@@ -164,6 +164,10 @@ const Engine = (function () {
// Preload GDExtension libraries.
const libs = [];
+ if (me.config.gdextensionLibs.length > 0 && !me.rtenv['loadDynamicLibrary']) {
+ return Promise.reject(new Error('GDExtension libraries are not supported by this engine version. '
+ + 'Enable "Extensions Support" for your export preset and/or build your custom template with "dlink_enabled=yes".'));
+ }
me.config.gdextensionLibs.forEach(function (lib) {
libs.push(me.rtenv['loadDynamicLibrary'](lib, { 'loadAsync': true }));
});