using UnityEngine; public class NewBehaviourScript : MonoBehaviour { // Use this for initialization void Start () { gameObject.AddComponent<NewBehaviourScript>();//添加组件 Renderer render = gameObject.GetComponent<Renderer>();//查找组件 render.enable
unity 有时候找路径太麻烦 写了一个自动生成脚本的工具 using System.Collections.Generic; using System.IO; using System.Text; using UnityEditor; using UnityEngine; public class Auto_BuildCode { private static string path_dic = Application.dataPath + "/Code"; private stat
//在unit菜单加入Component->b2Components->b2BodyComponent [AddComponentMenu("b2Components/b2BodyComponent")] public class b2BodyComponent : MonoBehaviour { }
http://blog.csdn.net/liujunjie612/article/details/45847877 我们接着上一篇博文继续研究摄像机,这篇我们说下Unity中摄像机的切换,说到切换,前提是有多个 摄像机,所以我们新建二个摄像机. 我们再创建一个空物体挂上我们新建的脚本CameraSwitch,用来控制摄像机的切换 代码如下: using UnityEngine; using System.Collections; public class CameraSwitch : Mono
http://forum.exceedu.com/forum/forum.php?mod=viewthread&tid=34175 Oculus Unity Development Guide开发指南转载请保留原始地 http://t.cn/RAblKoh Oculus/GearVR开发者群 302294234 Welcometo the Unity Development GuideIntroduction简介Welcometo the Oculus Unity Developer Gui