3D数学复习 using System.Collections; using System.Collections.Generic; using UnityEngine; public class w07d1 : MonoBehaviour { public Quaternion result1; public Quaternion result2; public Quaternion result3; // 什么是单位四元数? // [0, 0, 0, 1] 表示无旋转 // [n.x * s
项目中有几个页面在控制台出现这个“渲染层错误”,虽然不影响业务操作,怕存在潜在风险,今天抽时间找了下原因,解决这个问题. 控制台报错日志如下: (中国标准时间) 渲染层错误 Error: Expect END descriptor with depth 0 but get another at i.value (:39360/__pageframe__/__dev__/WAWebview.js:1) at Function.G [as _startCb] (:39360/__pageframe_
1. Texture,都去掉alpha通道,作为背景展示的图片,基本都没有透明要求,有特殊要求的则放到atlas里面 a. Loading图这类需要比较精细的,则把图片设置为Automatic TrueColor,设置真彩色,保证不失真 b. 地图.缩略图.UI背景图等等要求不精细的,则可以设置为自动压缩格式(有压缩情况,都需要图片宽高尺寸是2的幂,可以在Advance里面设置toNearest) 注意:ios下会自动把图片宽高拉伸为2的幂次方尺寸,这样会导致图片显示失真,解决办法是制作图片
首先,射线检测的API是这样的,网上找了一下,这个图片看得很清楚: 接下来是自己使用这个进行测试 using System.Collections; using System.Collections.Generic; using UnityEngine; //基本语法:public Ray ScreenPointToRay(Vector3 position); //其中参数position为屏幕位置参考点. //功能说明:此方法的作用是可以从Camera的近视口nearClip向前发射一条射线到