Closed gzz100 closed 9 months ago
webgl的build and run是没有问题的,可以正常打开空白场景
之前用2020 3.12f1没有这个问题,升级引擎后就不行了,已经试过很多办法了,感觉应该是转换的兼容性问题
我也遇到了这个问题 暂时回退大版本了
是新版本插件出现的问题么?之前的插件会有这样的问题么?
是新版本插件出现的问题么?之前的插件会有这样的问题么? 不是 老的也一样 应该是不支持2021的LTS版本, 2022的LTS我也试过了 只支持 3.0
问题已修复,下个版本后发出
重现步骤: 1.下载安装Unity2021 3.33f1及webgl支持 2.新建2D空项目(只有默认的SampleScene) 3.切换到WebGL 4.导入最新版本的转换工具:minigame.202401030933.unitypackage 5.点击打开微信小游戏转换面板,填写小游戏AppID及名称和名称及导出路径,首资源加载方式选择包内,点击"生成并转换" 6.等待生成结束,用微信开发者工具打开项目 报错如下: plugin.js:93 exception thrown: TypeError: Cannot read property 'push' of undefined,TypeError: Cannot read property 'push' of undefined at _JS_Init_ContextMenuHandler (http://127.0.0.1:34027/game/webgl.wasm.framework.unityweb.js:4:36469) at main (:wasm-function[20672]:0x633b6f)
at Module._main (http://127.0.0.1:34027/game/webgl.wasm.framework.unityweb.js:19:170390)
at callMain (http://127.0.0.1:34027/game/webgl.wasm.framework.unityweb.js:19:230809)
at doRun (http://127.0.0.1:34027/game/webgl.wasm.framework.unityweb.js:19:231632)
at run (http://127.0.0.1:34027/game/webgl.wasm.framework.unityweb.js:19:231804)
at runCaller (http://127.0.0.1:34027/game/webgl.wasm.framework.unityweb.js:19:230468)
at removeRunDependency (http://127.0.0.1:34027/game/webgl.wasm.framework.unityweb.js:4:16772)
at receiveInstance (http://127.0.0.1:34027/game/webgl.wasm.framework.unityweb.js:4:18927)
at receiveInstantiationResult (http://127.0.0.1:34027/game/webgl.wasm.framework.unityweb.js:4:19141)(env: Windows,mg,1.06.2308310; lib: 3.2.5)
e.printErr @ plugin.js:93
callMain @ webgl.wasm.framework.unityweb.js:19
doRun @ webgl.wasm.framework.unityweb.js:19
run @ webgl.wasm.framework.unityweb.js:19
runCaller @ webgl.wasm.framework.unityweb.js:19
removeRunDependency @ webgl.wasm.framework.unityweb.js:4
receiveInstance @ webgl.wasm.framework.unityweb.js:4
receiveInstantiationResult @ webgl.wasm.framework.unityweb.js:4
Promise.then (async)
instantiateArrayBuffer @ webgl.wasm.framework.unityweb.js:4
instantiateAsync @ webgl.wasm.framework.unityweb.js:4
createWasm @ webgl.wasm.framework.unityweb.js:4
unityFramework @ webgl.wasm.framework.unityweb.js:19
(anonymous) @ plugin.js:93
setTimeout (async)
(anonymous) @ plugin.js:93
s @ plugin.js:68
(anonymous) @ plugin.js:68
(anonymous) @ plugin.js:68
o @ plugin.js:93
Promise.then (async)
u @ plugin.js:93
(anonymous) @ plugin.js:93
Xn @ plugin.js:93
success @ plugin.js:93
plugin.js:93 [PLUGIN TIME LOG 09:52.51.627] callMain耗时: 29ms
plugin.js:93 [PLUGIN TIME LOG 09:52.51.627] 游戏启动耗时: 2623ms
TypeError: Browser.mainLoop.scheduler is not a function
at Object.resume (webgl.wasm.framework.unityweb.js:19)
at n.e.calledMainCb (plugin.js:93)
at callMain (webgl.wasm.framework.unityweb.js:19)
at doRun (webgl.wasm.framework.unityweb.js:19)
at run (webgl.wasm.framework.unityweb.js:19)
at runCaller (webgl.wasm.framework.unityweb.js:19)
at removeRunDependency (webgl.wasm.framework.unityweb.js:4)
at receiveInstance (webgl.wasm.framework.unityweb.js:4)
at receiveInstantiationResult (webgl.wasm.framework.unityweb.js:4)(env: Windows,mg,1.06.2308310; lib: 3.2.5)
RuntimeError: function signature mismatch
at OrientationChangeHandler(int, int, int) (:wasm-function[31634]:0x7fe080)
at dynCall_viii (:wasm-function[21156]:0x65f0c1)
at Module.dynCall_viii (http://127.0.0.1:34027/game/webgl.wasm.framework.unityweb.js:19:174148)
at JS_ScreenOrientation_eventHandler (http://127.0.0.1:34027/game/webgl.wasm.framework.unityweb.js:4:40404)
at Function. (http://127.0.0.1:34027/game/unity-sdk/fix.js:27:19)
at
at http://127.0.0.1:34027/game/__dev__/WAGameSubContext.js:1:147481
at t. (http://127.0.0.1:34027/game/__dev__/WAGameSubContext.js:1:134987)
at http://127.0.0.1:34027/game/__dev__/WAGameSubContext.js:1:213907(env: Windows,mg,1.06.2308310; lib: 3.2.5)
plugin.js:93 MiniProgramError
function signature mismatch
RuntimeError: function signature mismatch
at OrientationChangeHandler(int, int, int) (:wasm-function[31634]:0x7fe080)
at dynCall_viii (:wasm-function[21156]:0x65f0c1)
at Module.dynCall_viii (http://127.0.0.1:34027/game/webgl.wasm.framework.unityweb.js:19:174148)
at JS_ScreenOrientation_eventHandler (http://127.0.0.1:34027/game/webgl.wasm.framework.unityweb.js:4:40404)
at Function. (http://127.0.0.1:34027/game/unity-sdk/fix.js:27:19)
at
at http://127.0.0.1:34027/game/__dev__/WAGameSubContext.js:1:147481
at t. (http://127.0.0.1:34027/game/__dev__/WAGameSubContext.js:1:134987)
at http://127.0.0.1:34027/game/__dev__/WAGameSubContext.js:1:213907(env: Windows,mg,1.06.2308310; lib: 3.2.5)