当前位置:网站首页>Unity WebGL RuntimeError: integer overflow(整数溢出问题)
Unity WebGL RuntimeError: integer overflow(整数溢出问题)
2022-08-11 04:57:00 【九本才】
今天在开发Web版项目的时候发现整数溢出的问题。
An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was:
RuntimeError: integer overflow

仔细查看是WebAssembly在实例化的时候出现了问题。于是我门查看一下打包的设置。
在打包设置里边我门看一下 WebAssembly Arithmetic Exceptions
包含 WebAssembly 代码的不同捕获模式的枚举。
此枚举在 WebGL 平台中用于定义在 WebAssembly 代码中执行算术运算时使用的捕获类型。
| throw | WebAssembly 代码会在除以零、将非常大的浮点数舍入为 int 等情况下抛出异常。 |
| ignore | 此模式通过在执行算术运算时将浮点值限制在合理范围内来避免陷阱。 |
设置为 Ignore,忽略掉浏览器的异常错误。
这样子就不会在浏览器端弹出报错弹窗而影响程序运行逻辑。

边栏推荐
- Zabbix builds enterprise-level monitoring and alarm platform
- 开发工具篇第七讲:阿里云日志查询与分析
- 分层架构&SOA架构
- Switch and Router Technology - 36-Port Mirroring
- Merkel Studio--OpenEuler Training Notes (1)
- map and set - natural search and lookup semantics
- 源代码加密技术浅析
- Events and scheduled tasks in Mysql
- The use of async (asynchronous) and await
- Project Practice Lecture 27: Application of Status Mode in Duplicate Brands
猜你喜欢

CAD2020 打开错误报告 e06d7363h Exception at 13644F69h

对象的创建以及显示转换

交换机和路由器技术-26-OSPF末梢区域配置

Switches and routers technology - 26 - configure OSPF peripheral area

Embedded Sharing Collection 33

嵌入式分享合集33

优化是一种习惯●出发点是“站在靠近临界“的地方

Object Creation and Display Transformation

Word2021 中的图片保存后就变模糊了

Switch---Spanning Tree---Three-layer Architecture Summary
随机推荐
简历里写了会代码,却依然过不了面试这一关
CAN/以太网转换器 CAN与以太网互联互通
对象的创建以及显示转换
FPGA engineer interview questions collection 111~120
澳大利亚网络空间安全体系建设论析
交换机和路由器技术-33-静态NAT
Smart Pointer Notes
Switch---Spanning Tree---Three-layer Architecture Summary
交换机和路由器技术-22/23-OSPF动态路由协议/链路状态同步过程
FPGA工程师面试试题集锦121~130
视觉任务种常用的类别文件之一json文件
Merkel Studio--OpenEuler Training Notes (1)
K8s Review Notes 7--K8S Implementation of Redis Standalone and Redis-cluster
交换机和路由器技术-28-OSPF的NSSA区域
Application layer protocol - DNS
Switches and routers technology - 26 - configure OSPF peripheral area
Embedded Sharing Collection 33
Word2021 中的图片保存后就变模糊了
交换机和路由器技术-36-端口镜像
Switch and Router Technology-27-OSPF Route Redistribution