43 lines
812 B
C#
43 lines
812 B
C#
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<Canvas>() == null)
|
|
// return;
|
|
UIElement ui = GetComponent<UIElement>();
|
|
ui.OnRelease.RegisterAction(() =>
|
|
{
|
|
Canvas.DeactivateAllCanvas();
|
|
|
|
canvasToActivate.SetActive(true);
|
|
|
|
});
|
|
}
|
|
|
|
protected override void start()
|
|
{
|
|
|
|
|
|
}
|
|
|
|
protected override void update()
|
|
{
|
|
|
|
}
|
|
|
|
|
|
}
|
|
}
|