28 lines
323 B
C#
28 lines
323 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
[ExecuteInEditMode]
|
|
public class CheckBox : MonoBehaviour
|
|
{
|
|
public Image toggleImage;
|
|
|
|
public bool ison;
|
|
|
|
private void Start()
|
|
{
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
if (!(toggleImage == null))
|
|
{
|
|
toggleImage.enabled = ison;
|
|
}
|
|
}
|
|
|
|
public void Check()
|
|
{
|
|
ison = !ison;
|
|
}
|
|
}
|