PanelCameraControl.cs 373 B

12345678910111213141516171819202122
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class PanelCameraControl : MonoBehaviour {
  5. public Camera cameraToEnable, cameraToDisable;
  6. void OnEnable()
  7. {
  8. cameraToEnable.enabled = true;
  9. cameraToDisable.enabled = false;
  10. }
  11. void OnDisable()
  12. {
  13. cameraToEnable.enabled = false;
  14. cameraToDisable.enabled = true;
  15. }
  16. }