1234567891011121314151617181920212223242526272829303132 |
- using System;
- using UnityEngine;
- public class OvrUIViewCamera : MonoBehaviour
- {
- private void Start()
- {
- this.m_camera = base.GetComponent<Camera>();
- this.m_trPlane = base.transform.Find("Plane");
- this.m_camera.enabled = false;
- if (this.m_trPlane != null)
- {
- this.m_trPlane.gameObject.SetActive(false);
- }
- }
- private void Update()
- {
- if (Input.GetKeyUp(KeyCode.I) && this.m_camera != null)
- {
- this.m_camera.enabled = !this.m_camera.enabled;
- if (this.m_trPlane != null)
- {
- this.m_trPlane.gameObject.SetActive(this.m_camera.enabled);
- }
- }
- }
- private Camera m_camera;
- private Transform m_trPlane;
- }
|