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); } }