You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
691 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class UIHideshow : MonoBehaviour
{
void Start()
{
GetComponent<CanvasGroup>().alpha = 0;
}
public void EnterUIShow()
{
GetComponent<CanvasGroup>().alpha = 1;
GameObject.Find("Main Camera").GetComponent<CameraOrbit>().canScroll = false;
}
public void ExitUIHide()
{
GetComponent<CanvasGroup>().alpha = 0;
GameObject.Find("Main Camera").GetComponent<CameraOrbit>().canScroll = true;
foreach (var dd in GameObject.Find("LeftUI").GetComponentsInChildren<Dropdown>())
dd.Hide();
}
}