Switching Cameras at runtime
来源:互联网 发布:软件测试费 编辑:程序博客网 时间:2024/04/28 17:23
using UnityEngine;using System.Collections; public class camControl : MonoBehaviour { void Update () { if(Input.GetKey("1")){ Debug.Log("Using Camera One"); camSwap(1); } if(Input.GetKey("2")){ Debug.Log("Using Camera Two"); camSwap(2); } if(Input.GetKey("3")){ Debug.Log("Using Camera Three"); camSwap(3); } } void camSwap(int currentCam){ GameObject[] cameras = GameObject.FindGameObjectsWithTag("cam"); foreach (GameObject cams in cameras){ Camera theCam = cams.GetComponent<Camera>() as Camera; theCam.enabled = false; } string oneToUse = "Camera"+currentCam; Camera usedCam = GameObject.Find(oneToUse).GetComponent<Camera>() as Camera; usedCam.enabled = true; }}
- Switching Cameras at runtime
- WPF dynamic language switching at runtime
- Cameras
- Resizing Controls at Runtime
- Skipping tests at runtime
- Tomcat reload class at runtime
- Change Locale at the runtime
- Compiling C++ code at runtime
- Unity Loading Resources at Runtime
- UITabBarView(Managing Tabs at Runtime)
- Create class at OC runtime
- Changing Target Web Service At Runtime
- Adding Controls to a DataGrid at Runtime
- How Eclipse Finds Your Classes at Runtime
- Adding Library or Classpath at runtime
- Adding Controls to Windows Forms at Runtime
- how to get callstack at runtime?
- Append items at runtime to a dropdownlist
- Java性能的十一个用法
- 火狐(FireFox)浏览器屏蔽非80端口的问题
- SQL查询语句简要使用精华——之 简单查询
- MySQL事务隔离级别
- js检测浏览器的版本并给出提示
- Switching Cameras at runtime
- 实现ListView过滤功能,继承于BaseAdapter,非ArrayAdapter。
- 转:临界区的产生
- 读书笔记 第七章-进程环境
- 体验Windows 2008 R2的RemoteApp
- MFC 创建启动画面的实现
- 【哈哈,我太牛了】被中差评逼出来的终极解决方案!!
- 浅谈白盒测试中桩函数的灵活应用
- Finder 异常买家检测客户端