using UnityEngine;using System.Collections; public class DrawRectangle : MonoBehaviour { public Color rectColor = Color.green; private Material rectMat = null;//画线的材质 不设定系统会用当前材质画线 结果不可控 // Use this for initialization void Start () { rectMat = new Ma
脚本需挂在相机上,如果你的脚本,编辑器报错了,Matrix stack full depth reached,加上这个方法试试GL.LoadPixelMatrix(); using System.Collections; using System.Collections.Generic; using UnityEngine; public class GridLine : MonoBehaviour { public static bool isShowGridLine=false; publi
这篇作为上一篇的补充介绍,主要讲Unity里面的投影矩阵的问题: 上篇的链接写给VR手游开发小白的教程:(三)UnityVR插件CardboardSDKForUnity解析(二) 关于Unity中的Camera,圣典里面对每一项属性都做了简要的介绍,没看过的小伙伴传送门在下面 http://www.ceeger.com/Components/class-Camera.html 一.裁剪面 先从这个专业的词汇开始,以下是圣典对裁剪面的介绍: The Near and Far Clip Plane