Open dotingcode opened 1 month ago
当使用 WXTCPSocket.OnMessage时报错
"MiniProgramError GameGlobal.Module.lengthBytesUTF8 is not a function TypeError: GameGlobal.Module.lengthBytesUTF8 is not a function at convertStringToPointer (http://127.0.0.1:26410/game/unity-sdk/utils.js:352:37) at convertDataToPointer (http://127.0.0.1:26410/game/unity-sdk/utils.js:366:12) at Function.callback (http://127.0.0.1:26410/game/unity-sdk/TCPSocket/index.js:195:49) at Function.t (http://127.0.0.1:26410/game/__dev__/WAGameSubContext.js:1:177744) at at c. (http://127.0.0.1:26410/game/__dev__/WAGame.js:1:205802) at c.emit (http://127.0.0.1:26410/game/__dev__/WAGame.js:1:431785) at Object.emit (http://127.0.0.1:26410/game/__dev__/WAGame.js:1:428892) at http://127.0.0.1:26410/game/__dev__/WAGame.js:1:1373954 at http://127.0.0.1:26410/game/__dev__/WAGame.js:1:450241 at http://127.0.0.1:26410/game/__dev__/WAGame.js:1:466041 at Object.emit (http://127.0.0.1:26410/game/__dev__/WAGame.js:1:122650) at c (http://127.0.0.1:26410/game/__dev__/asdebug.js:1:46720) at l (http://127.0.0.1:26410/game/__dev__/asdebug.js:1:46851) at http://127.0.0.1:26410/game/__dev__/asdebug.js:1:3691 at Set.forEach () at g (http://127.0.0.1:26410/game/__dev__/asdebug.js:1:3675) at e.exports.f (http://127.0.0.1:26410/game/__dev__/asdebug.js:1:3721) at http://127.0.0.1:26410/game/__dev__/asdebug.js:1:2717 at Set.forEach () at WebSocket._ws.onmessage (http://127.0.0.1:26410/game/__dev__/asdebug.js:1:2699)"
mac 1.1.2 202405171605
使用 WXUDPSocket 传输bytes 也是会报同样的问题
同样有解决吗
描述Bug
当使用 WXTCPSocket.OnMessage时报错
"MiniProgramError GameGlobal.Module.lengthBytesUTF8 is not a function TypeError: GameGlobal.Module.lengthBytesUTF8 is not a function at convertStringToPointer (http://127.0.0.1:26410/game/unity-sdk/utils.js:352:37) at convertDataToPointer (http://127.0.0.1:26410/game/unity-sdk/utils.js:366:12) at Function.callback (http://127.0.0.1:26410/game/unity-sdk/TCPSocket/index.js:195:49) at Function.t (http://127.0.0.1:26410/game/__dev__/WAGameSubContext.js:1:177744) at
at c. (http://127.0.0.1:26410/game/__dev__/WAGame.js:1:205802)
at c.emit (http://127.0.0.1:26410/game/__dev__/WAGame.js:1:431785)
at Object.emit (http://127.0.0.1:26410/game/__dev__/WAGame.js:1:428892)
at http://127.0.0.1:26410/game/__dev__/WAGame.js:1:1373954
at http://127.0.0.1:26410/game/__dev__/WAGame.js:1:450241
at http://127.0.0.1:26410/game/__dev__/WAGame.js:1:466041
at Object.emit (http://127.0.0.1:26410/game/__dev__/WAGame.js:1:122650)
at c (http://127.0.0.1:26410/game/__dev__/asdebug.js:1:46720)
at l (http://127.0.0.1:26410/game/__dev__/asdebug.js:1:46851)
at http://127.0.0.1:26410/game/__dev__/asdebug.js:1:3691
at Set.forEach ()
at g (http://127.0.0.1:26410/game/__dev__/asdebug.js:1:3675)
at e.exports.f (http://127.0.0.1:26410/game/__dev__/asdebug.js:1:3721)
at http://127.0.0.1:26410/game/__dev__/asdebug.js:1:2717
at Set.forEach ()
at WebSocket._ws.onmessage (http://127.0.0.1:26410/game/__dev__/asdebug.js:1:2699)"
运行环境