PO/Assets/Scripts/CanvasChanger.cs

19 lines
409 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class CanvasChanger : MonoBehaviour
{
public GameObject canvasToOn;
public GameObject canvasToOff;
public void ChangeCanvas()
{
if (canvasToOn != null)
canvasToOn.SetActive(true);
if (canvasToOn != null)
canvasToOff.SetActive(false);
}
}