zombieyang / puerts_unity_webgl_demo

在Unity里用Typescript写小游戏/Web游戏
BSD 3-Clause "New" or "Revised" License
190 stars 68 forks source link

[unity] Error: cannot found PuertsWebGL script. please find some way to load puerts-runtime.js #71

Closed mrwhalett closed 3 weeks ago

mrwhalett commented 3 weeks ago

error log | 日志或报错信息

Error: cannot found PuertsWebGL script. please find some way to load puerts-runtime.js t _InitPuertsWebGL (http://127.0.0.1:8081/Build/assets.framework.js:1483:9) at MainEnv_Get_mAC2BF76F4EABB1D291F740413E6F3E92ABC9A8AA (http://127.0.0.1:8081/Build/assets.wasm:wasm-function[143263]:0x26ccc6f) at TsManager_CreateJsEnv_mB56B793F485BE69AF85870154B1D2579D32B8453

context | 编译/运行环境

Unity 2021.3.32f1 谷歌浏览器 Puerts 2.1.0 Puerts commonjs support 2.0.5 Puerts webgl js builder 2.0.5 Puerts webgl support 2.0.5 Puerts TS loader 2.0.5

how to reproduce | 复现步骤

1.WebGL打包后网页运行

zombieyang commented 3 weeks ago

image

mrwhalett commented 3 weeks ago

20241104134854 22222 感谢回答,第四、五步分别如图报错

zombieyang commented 3 weeks ago

群里

20241104134854 22222 感谢回答,第四、五步分别如图报错

群里跟你说过了,puerts本体要用node版。

mrwhalett commented 3 weeks ago

群里

20241104134854 22222 感谢回答,第四、五步分别如图报错

群里跟你说过了,puerts本体要用node版。

多谢,换成nodejs版本了