随笔分类 -  Unity3d

摘要:1.下载Opencv for unity. 2.把OpenCVForUnity下的StreamingAssets拖到Assets下。 3.点击Tools->opencv for unity->set plugin import settings. 4. using UnityEngine; usin 阅读全文
posted @ 2016-10-21 16:52 Shiyu_Huang 阅读(8082) 评论(0) 推荐(2) 编辑
摘要:using UnityEngine; using System.Collections; public class dynaMesh : MonoBehaviour { public SkinnedMeshRenderer meshRenderer; public MeshCollider coll 阅读全文
posted @ 2016-08-19 00:48 Shiyu_Huang 阅读(1704) 评论(0) 推荐(0) 编辑
摘要:TODO 阅读全文
posted @ 2016-08-11 05:03 Shiyu_Huang 阅读(1221) 评论(0) 推荐(0) 编辑
摘要:1.Invoke(string methodName,float time) 在一定时间调用methodName函数 using UnityEngine; using System.Collections; public class example : MonoBehaviour { public 阅读全文
posted @ 2016-07-08 03:23 Shiyu_Huang 阅读(3969) 评论(0) 推荐(0) 编辑
摘要:using UnityEngine; using System.Collections; public class DrawRectangle : MonoBehaviour { public Color rectColor = Color.green; private Material rectMat = null;//画线的材质 不设定系统会用当前材质画线 结果不可控 // U... 阅读全文
posted @ 2016-07-02 04:58 Shiyu_Huang 阅读(5570) 评论(0) 推荐(0) 编辑
摘要:1、世界坐标→屏幕坐标:camera.WorldToScreenPoint(transform.position);这样可以将世界坐标转换为屏幕坐标。其中camera为场景中的camera对象。 2、屏幕坐标→视口坐标:camera.ScreenToViewportPoint(Input.GetTo 阅读全文
posted @ 2016-07-02 04:54 Shiyu_Huang 阅读(649) 评论(0) 推荐(0) 编辑
摘要:if (Input.GetKeyDown(KeyCode.A)){ Debug.Log("您按下了A键"); } if (Input.GetKeyUp(KeyCode.A)) { Debug.Log("您抬起了A键"); } 阅读全文
posted @ 2016-06-30 22:10 Shiyu_Huang 阅读(220) 评论(0) 推荐(0) 编辑
摘要:1.Application.CaptureScreenshot("Screenshot.png", 0); 2. 截中间4分之(如下图):CaptureScreenshot2( new Rect( Screen.width*0.25f, Screen.height*0.25f, Screen.wid 阅读全文
posted @ 2016-06-30 22:08 Shiyu_Huang 阅读(293) 评论(0) 推荐(0) 编辑