gpt4 book ai didi

html - 如何解决 WebGL Unity 游戏中的这个错误?

转载 作者:行者123 更新时间:2023-12-04 04:08:50 30 4
gpt4 key购买 nike

我不知道为什么会收到此错误。在 WebGL 中构建我的项目并在 itch.io 游戏窗口(在 Chrome 中)中启动它后,它显示此消息,游戏无法运行:

An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was: uncaught exception: abort(180) at jsStackTrace (WebGL.wasm.framework.unityweb:8:22313) stackTrace (WebGL.wasm.framework.unityweb:8:22484) onAbort@file:///C:/Users/wujtm_000/Desktop/WebGL/Build/UnityLoader.js:4:11118 abort (WebGL.wasm.framework.unityweb:8:483539) @blob:null/721358bf-caaa-4408-babf-350932a4b11a line 8 > WebAssembly.instantiate:wasm-function[45753]:0xda48f7 (blob:null/721358bf-caaa-4408-babf-350932a4b11a line 8 > WebAssembly.instantiate:wasm-function[22089]:0x9023d7) @blob:null/721358bf-caaa-4408-babf-350932a4b11a line 8 > WebAssembly.instantiate:wasm-function[24498]:0x95f899 (blob:null/721358bf-caaa-4408-babf-350932a4b11a line 8 > WebAssembly.instantiate:wasm-function[22992]:0x93c06c) @blob:null/721358bf-caaa-4408-babf-350932a4b11a line 8 > WebAssembly.instantiate:wasm-function[45533]:0xda3cc0 UnityModule [UnityModule/Module.dynCall_iiiii] (WebGL.wasm.framework.unityweb:8:458801) invoke_iiiii (WebGL.wasm.framework.unityweb:8:335855) @blob:null/721358bf-caaa-4408-babf-350932a4b11a line 8 > WebAssembly.instantiate:wasm-function[43654]:0xd4f185 (blob:null/721358bf-caaa-4408-babf-350932a4b11a line 8 > WebAssembly.instantiate:wasm-function[43125]:0xd37edc) @blob:null/721358bf-caaa-4408-babf-350932a4b11a line 8 > WebAssembly.instantiate:wasm-function[4225]:0x18b90c (blob:null/721358bf-caaa-4408-babf-350932a4b11a line 8 > WebAssembly.instantiate:wasm-function[4224]:0x18b835) @blob:null/721358bf-caaa-4408-babf-350932a4b11a line 8 > WebAssembly.instantiate:wasm-function[10198]:0x3c205a (blob:null/721358bf-caaa-4408-babf-350932a4b11a line 8 > WebAssembly.instantiate:wasm-function[10182]:0x3c0d4e) @blob:null/721358bf-caaa-4408-babf-350932a4b11a line 8 > WebAssembly.instantiate:wasm-function[12109]:0x4b637b (blob:null/721358bf-caaa-4408-babf-350932a4b11a line 8 > WebAssembly.instantiate:wasm-function[12108]:0x4b6095) @blob:null/721358bf-caaa-4408-babf-350932a4b11a line 8 > WebAssembly.instantiate:wasm-function[10577]:0x3ed282 (blob:null/721358bf-caaa-4408-babf-350932a4b11a line 8 > WebAssembly.instantiate:wasm-function[10288]:0x3caa9b) @blob:null/721358bf-caaa-4408-babf-350932a4b11a line 8 > WebAssembly.instantiate:wasm-function[10288]:0x3caab0 (blob:null/721358bf-caaa-4408-babf-350932a4b11a line 8 > WebAssembly.instantiate:wasm-function[10283]:0x3ca5ba) @blob:null/721358bf-caaa-4408-babf-350932a4b11a line 8 > WebAssembly.instantiate:wasm-function[10276]:0x3c881e (blob:null/721358bf-caaa-4408-babf-350932a4b11a line 8 > WebAssembly.instantiate:wasm-function[45547]:0xda3ef2) UnityModule [UnityModule/Module.dynCall_v] (WebGL.wasm.framework.unityweb:8:467249) browserIterationFunc (WebGL.wasm.framework.unityweb:8:175900) runIter (WebGL.wasm.framework.unityweb:8:178973) Browser_mainLoop_runner (WebGL.wasm.framework.unityweb:8:177435)

argh..

网络控制台错误:

Invoking error handler due to Uncaught abort(180) at Error at jsStackTrace (WebGL.wasm.framework.unityweb:8:22313) at stackTrace [Object.stackTrace] (WebGL.wasm.framework.unityweb:8:22484) at Object.onAbort (https://v6p9d9t4.ssl.hwcdn.net/html/2312897/WebGL/Build/UnityLoader.js:4:11118) at abort (WebGL.wasm.framework.unityweb:8:483549) at :wasm-function[45753]:0xda48f7 at :wasm-function[22089]:0x9023d7 at :wasm-function[24498]:0x95f899 at :wasm-function[22992]:0x93c06c at dynCall_iiiii (:wasm-function[45533]:0xda3cc0) at dynCall_iiiii [Object.dynCall_iiiii] (WebGL.wasm.framework.unityweb:8:458801) at invoke_iiiii (WebGL.wasm.framework.unityweb:8:335871) at :wasm-function[43654]:0xd4f185 at :wasm-function[43125]:0xd37edc at :wasm-function[4225]:0x18b90c at :wasm-function[4224]:0x18b835 at :wasm-function[10198]:0x3c205a at :wasm-function[10182]:0x3c0d4e at :wasm-function[12109]:0x4b637b at :wasm-function[12108]:0x4b6095 at :wasm-function[10577]:0x3ed282 at :wasm-function[10288]:0x3caa9b at :wasm-function[10288]:0x3caab0 at :wasm-function[10283]:0x3ca5ba at :wasm-function[10276]:0x3c881e at dynCall_v (:wasm-function[45547]:0xda3ef2) at dynCall_v [Object.dynCall_v] (WebGL.wasm.framework.unityweb:8:467249) at browserIterationFunc (WebGL.wasm.framework.unityweb:8:175912) at runIter [Object.runIter] (WebGL.wasm.framework.unityweb:8:178973) at Browser_mainLoop_runner (WebGL.wasm.framework.unityweb:8:177435) DevTools failed to load SourceMap: Could not load content for chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/include.preload.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME DevTools failed to load SourceMap: Could not load content for chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/include.postload.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME blob:https://v6p9d9t4.ssl.hwcdn.net/cf55a5c5-c403-41ef-aab8-de035b7ea92b:8 Uncaught abort(180) at Error at jsStackTrace (blob:https://v6p9d9t4.ssl.hwcdn.net/cf55a5c5-c403-41ef-aab8-de035b7ea92b:8:22313) at Object.stackTrace (blob:https://v6p9d9t4.ssl.hwcdn.net/cf55a5c5-c403-41ef-aab8-de035b7ea92b:8:22484) at Object.onAbort (https://v6p9d9t4.ssl.hwcdn.net/html/2312897/WebGL/Build/UnityLoader.js:4:11118) at abort (blob:https://v6p9d9t4.ssl.hwcdn.net/cf55a5c5-c403-41ef-aab8-de035b7ea92b:8:483549) at :wasm-function[45753]:0xda48f7 at :wasm-function[22089]:0x9023d7 at :wasm-function[24498]:0x95f899 at :wasm-function[22992]:0x93c06c at dynCall_iiiii (:wasm-function[45533]:0xda3cc0) at Object.dynCall_iiiii (blob:https://v6p9d9t4.ssl.hwcdn.net/cf55a5c5-c403-41ef-aab8-de035b7ea92b:8:458801) at invoke_iiiii (blob:https://v6p9d9t4.ssl.hwcdn.net/cf55a5c5-c403-41ef-aab8-de035b7ea92b:8:335871) at :wasm-function[43654]:0xd4f185 at :wasm-function[43125]:0xd37edc at :wasm-function[4225]:0x18b90c at :wasm-function[4224]:0x18b835 at :wasm-function[10198]:0x3c205a at :wasm-function[10182]:0x3c0d4e at :wasm-function[12109]:0x4b637b at :wasm-function[12108]:0x4b6095 at :wasm-function[10577]:0x3ed282 at :wasm-function[10288]:0x3caa9b at :wasm-function[10288]:0x3caab0 at :wasm-function[10283]:0x3ca5ba at :wasm-function[10276]:0x3c881e at dynCall_v (:wasm-function[45547]:0xda3ef2) at Object.dynCall_v (blob:https://v6p9d9t4.ssl.hwcdn.net/cf55a5c5-c403-41ef-aab8-de035b7ea92b:8:467249) at browserIterationFunc (blob:https://v6p9d9t4.ssl.hwcdn.net/cf55a5c5-c403-41ef-aab8-de035b7ea92b:8:175912) at Object.runIter (blob:https://v6p9d9t4.ssl.hwcdn.net/cf55a5c5-c403-41ef-aab8-de035b7ea92b:8:178973) at Browser_mainLoop_runner (blob:https://v6p9d9t4.ssl.hwcdn.net/cf55a5c5-c403-41ef-aab8-de035b7ea92b:8:177435) DevTools failed to load SourceMap: Could not load content for chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/include.preload.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME DevTools failed to load SourceMap: Could not load content for chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/include.postload.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME 29cf55a5c5-c403-41ef-aab8-de035b7ea92b:8 An abnormal situation has occurred: the PlayerLoop internal function has been called recursively. Please contact Customer Support with a sample project so that we can reproduce the problem and troubleshoot it. (Filename: Line: 377)

如果你需要Unity Launcher js。代码 - 我不能在这里涉及它,因为它有太多字母,priv。


我尝试过的事情:

  • 重建项目
  • 在 Firefox 中本地运行它,这通常有效,但同样的错误是显示...
  • 将 Unity 更新到最新版本
  • 制作另一个非常小的项目并构建它 WebGL - 成功了!!!我不知道如何让这个大项目顺利进行,有什么建议...?

请帮忙!!!

最佳答案

不确定这是否仍然重要,但无论如何这是一个答案。我们能够确保此问题几乎不再发生。我们仍在考虑加强这一点,因为无论如何都会不时弹出错误。

1。在统一中

  • 确保更新 Unity。最后一个版本似乎可以更好地处理这个问题。
  • 分配更多内存。在我们的特定用例中,我们确实可以使用更多内存 (-s WASM_MEM_MAX=1024MB)。

2。在JS中

  • 我们确保每次都退出 Unity(在我们的 Angular SPA 中!)。由于有一个 service worker 可以很容易地再次为 Unity 服务,我们总是删除该实例。

this.gameInstance
.Quit()
.then(() => {
// Do whatever your app needs here
this.gameInstance = null;
this.playState$.next(null);
})
.catch(() => {
console.log("Quitting Unity wasn't a success 😖");
});

这让事情变得更加稳定。希望对您有所帮助。

关于html - 如何解决 WebGL Unity 游戏中的这个错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62092755/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com