Description
描述Bug
如题,调用 WX.SetDeviceOrientation 后再 微信开发者工具里面报错
报错信息如下
MiniProgramError
Cannot assign to read only property 'innerWidth' of object '#'
TypeError: Cannot assign to read only property 'innerWidth' of object '#'
at Function. (http://127.0.0.1:49961/game/plugins/screen-adapter.js:10:21)
at Function.t (http://127.0.0.1:49961/game/__dev__/WAGameSubContext.js:1:178506)
at
at c. (http://127.0.0.1:49961/game/__dev__/WAGame.js:1:209054)
at c.emit (http://127.0.0.1:49961/game/__dev__/WAGame.js:1:513760)
at Object.emit (http://127.0.0.1:49961/game/__dev__/WAGame.js:1:321588)
at http://127.0.0.1:49961/game/__dev__/WAGame.js:1:322288
at http://127.0.0.1:49961/game/__dev__/WAGame.js:1:533400
at http://127.0.0.1:49961/game/__dev__/WAGame.js:1:550248
at Object.emit (http://127.0.0.1:49961/game/__dev__/WAGame.js:1:126384)
at c (ide:///extensions/appservice/index.js:1:12880)
at l (ide:///extensions/appservice/index.js:1:13019)
at ide:///extensions/appservice/index.js:1:83446
at Set.forEach ()
at g (ide:///extensions/appservice/index.js:1:83429)
at e.exports.p (ide:///extensions/appservice/index.js:1:83477)
at ide:///extensions/appservice/index.js:1:101840
at Set.forEach ()
at WebSocket._ws.onmessage (ide:///extensions/appservice/index.js:1:101821)(env: Windows,mg,1.06.2503281; lib: 3.5.1)
e.printErr @ plugin.js:93
(anonymous) @ unity-namespace.js? [sm]:123
运行环境
Windows11/Unity2022.3.55f1c1/minigame.202505070335/Package导入/WebGL