mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/MI-38.git
synced 2026-01-24 11:45:37 +03:00
04.07.2022
This commit is contained in:
23
Heli_with_panels/Assets/Fusel/scripts/CamSwitch.cs
Normal file
23
Heli_with_panels/Assets/Fusel/scripts/CamSwitch.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class CamSwitch : MonoBehaviour
|
||||
{
|
||||
public Camera Main;
|
||||
public Camera CamSystem;
|
||||
//public GameObject ButtonMain1;
|
||||
//public GameObject ButtonMain2;
|
||||
//public GameObject Button;
|
||||
|
||||
public void SwitchCam()
|
||||
{
|
||||
CamSystem.enabled = true;
|
||||
Main.enabled = false;
|
||||
GameObject.FindGameObjectWithTag("Canvas").GetComponent<Canvas>().worldCamera = CamSystem;
|
||||
//ButtonMain1.gameObject.SetActive(false);
|
||||
//ButtonMain2.gameObject.SetActive(false);
|
||||
//Button.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user