mirror of
https://github.com/RaindropViewer/RaindropViewer.git
synced 2026-07-28 06:34:49 +00:00
30 lines
491 B
C#
30 lines
491 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UniRx;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class toggleUI : MonoBehaviour
|
|
{
|
|
private bool state;
|
|
|
|
[SerializeField] private Button button;
|
|
[SerializeField] public GameObject UI;
|
|
|
|
private void Awake()
|
|
{
|
|
}
|
|
|
|
public void toggle()
|
|
{
|
|
if (UI.activeInHierarchy)
|
|
{
|
|
UI.SetActive(false);
|
|
} else
|
|
{
|
|
UI.SetActive(true);
|
|
}
|
|
}
|
|
|
|
}
|