你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
搜索:
发现
话题
全文搜索
登录
[LayaAirIDE 2.0]TypeError: Cannot read property 'GetType' of null
偶尔会有报错 不知道触发条件 求问解决方法
没有找到相关结果
已邀请:
与内容相关的链接
提交
2 个回复
Aar0n
赞同来自:
查问题至少需要一个复现demo
与你同在
赞同来自:
我遇到过,后来解决了,这个发生的概率很小,原因是你在OnTrigger中执行了remove某个带碰撞器的物体,但是这个物体在本帧结束的时候才会被移除,这个时候物体已经不存在了但是在该帧还在舞台上,也就可以发生碰撞,接下来在该帧中发生碰撞就会触发这个bug。也就是在一帧中发生了碰撞——remove——碰撞,因为执行了remove你就没办法GetType,解决方法就是在OnTrigger中加个布尔值去控制OnTrigger中的代码一帧只去执行一次,问题就解决了,就再也不会出现这个bug。
要回复问题请先
登录
发起人
且过奈何
相关问题
laya2.0加载3d场景报错Uncaught TypeError: Cannot read property 'btCollisionObject' of undefined
子类父类都有regclass,但是编辑器没有暴露出父类的property
alertexception info: [Typeerror: null is not object (evaluating this. vaoext createvertexarrayoes"]
鼠标自定义样式官方有支持吗,Laya.Mouse.hide()会报Uncaught TypeError: Cannot read property 'cursor' of undefined错误
Cannot read property 'displayObject' of null
浏览器运行提示TypeError: xxx is not a function
laya2.6.0打apk和小游戏都会报_InPool为null
Getcomponent 报错Uncaught (in promise) TypeError: Right-hand side of 'instanceof' is not an object
Uncaught TypeError: Cannot read property 'props' of undefined
莫名其妙的报错,this.getStyle()是null
遍历子对象的时候多出两个null
问题状态
最新活动:
2019-04-21 09:11
浏览:
3374
关注:
3
人
商务合作
2 个回复
Aar0n
赞同来自:
与你同在
赞同来自: