using SHADE; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SHADE_Scripting.UI { public class ChangeCanvasButton:Script { public GameObject canvasToActivate; protected override void awake() { //if (canvasToActivate.GetComponent() == null) // return; UIElement ui = GetComponent(); ui.OnRelease.RegisterAction(() => { Canvas.DeactivateAllCanvas(); canvasToActivate.SetActive(true); }); } protected override void start() { } protected override void update() { } } }