コード例 #1
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKey(KeyCode.Alpha1))
     {
         TPCamera.SetActive(true);
         MainCamera.SetActive(false);
         FPCamera.SetActive(false);
     }
     else if (Input.GetKey(KeyCode.Alpha2))
     {
         TPCamera.SetActive(false);
         MainCamera.SetActive(false);
         FPCamera.SetActive(true);
     }
     else if (Input.GetKey(KeyCode.Alpha3))
     {
         TPCamera.SetActive(false);
         MainCamera.SetActive(true);
         FPCamera.SetActive(false);
     }
 }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     TPCamera.SetActive(true);
     MainCamera.SetActive(false);
     FPCamera.SetActive(false);
 }