zombieyang / puerts_unity_webgl_demo

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

1.42版本 unity版本 2022.3.34f1c1 上发布webgl打开后报错 调用Puerts.WebGL.GetBrowserEnv( 报错: ReferenceError: _memset is not defined at _InitPuertsWebGL (Build.framework.js:2340:24) #63

Closed kefeibuhuifei closed 4 months ago

kefeibuhuifei commented 4 months ago

error log | 日志或报错信息

ReferenceError: _memset is not defined at _InitPuertsWebGL (Build.framework.js:2340:24) image

context | 编译/运行环境

2023.3.34F1CA window11

how to reproduce | 复现步骤

  1. 按照流程安装 puerts1.42 与puerts webgl版本
  2. 按正常发布流程
  3. 浏览器打开发布好的工程,调用接口 Puerts.WebGL.GetBrowserEnv 就会出现

more | 其他

Halliwood commented 4 months ago

这个把_memset导出就好了 PlayerSettings.WebGL.emscriptenArgs += "-s \"EXPORTED_FUNCTIONS=['_main', '_memset']\"";

zombieyang commented 4 months ago

1.4.2没精力管了,按楼上的做法改吧

kefeibuhuifei commented 4 months ago

这个把_memset导出就好了 PlayerSettings.WebGL.emscriptenArgs += "-s "EXPORTED_FUNCTIONS=['_main', '_memset']"";

thanks