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() { } protected override void start() { //if (canvasToActivate.GetComponent() == null) // return; UIElement ui = GetComponent(); ui.OnRelease.RegisterAction(() => { Canvas.DeactivateAllCanvas(); canvasToActivate.SetActive(true); Debug.Log("CANVAS CHANGED "); }); } protected override void update() { } } }