近期遇见的n个问题
持续更新中…
1,unity导入PNG图片不透明(有白色)
解决方法:勾选属性面板的Alpha Is Transparency,然后Apply
2,材质球导入透明图片,显示很诡异
解决方法:属性面板的shader中拉选Unlit的Transparent
3,报错!IsFinite(outDistanceForSort) & !IsFinite(outDistanceAlongView) & 绑定骨骼后原图片消失
解决方法:属性面板的部分值有问题,可能是非数字,也可能是无限大,修改回来就好。
我的问题在于:绑定骨骼时的SpriteMesh的Slice的Tessellation设置成0了,属性面板的center和extent变成了无穷大。改一改数值就好了。
4,触发器没有起作用
解决方法:
1,添加Rigidibody组件
2,2D物体的Sorting Layer调整为同一级
3,目标对象没有写明,比如:
void OnTriggerEnter(Collider other){
if(other.tag="Enemy")
return;
Destory(other.gameObject);
//这里的other不能省略,如果省略就变成了this的意思
}
void OnTriggerEnter(Collider other){
if(other.tag="Enemy")
return;
Destory(this.gameObject);
}
5,Should not be capturing when there is a hotcontrol
解决方法:暂无!