01 2013 档案

摘要:这个问题目前还没有找到完美的解决方案,目前只能通过GUIUtility.hotControl来侦测是否点击到面板上if(Input.GetMouseButton(0) && GUIUtility.hotControl ==1) 阅读全文
posted @ 2013-01-21 15:34 星尘 阅读(940) 评论(0) 推荐(0) 编辑
摘要:IEnumerator LoadPhoto(){ string path =Application.dataPath+"/Resources/"; string[] strs = System.IO.Directory.GetFiles(path); foreach (string file in strs) { System.IO.FileInfo fi = new System.IO.FileInfo(file); if (fi.Extension == ".pn... 阅读全文
posted @ 2013-01-21 15:21 星尘 阅读(4658) 评论(1) 推荐(0) 编辑
摘要:void OnGUI(){ if(GUI.Button(new Rect(10,70,50,50),"ScreenShot")){ StartCoroutine(ScreenShot()); //协程调用 } } IEnumerator ScreenShot(){ int width = Screen.width; int height = Screen.height; yield return new... 阅读全文
posted @ 2013-01-21 14:36 星尘 阅读(3725) 评论(1) 推荐(0) 编辑
摘要:1、 画多条线画多条线需要在场景中放置多个GameObject,因为一个GameObject只能添加一个LineRenderer Component。2、 线段样式线段的样式由LineRenderer组件的材质控制3、 坐标系LineRenderer使用了2种坐标系:World和Location。在设置目标点的时候需要注意你使用的坐标系是哪一种。Location:transform.LookAt(rh.point); //GameObject始终面对目标点lineRenderer = (LineRenderer)gameObject.GetComponent ("LineRender 阅读全文
posted @ 2013-01-21 11:48 星尘 阅读(34687) 评论(3) 推荐(0) 编辑