using UnityEngine; using System.Collections; using System.Xml.Schema; using System; public class CheckBoxConditionsHandler : ToggleButton { public GameObject LabelLogin; public GameObject LabelLogout; void Start() { LabelLogin.gameObject.SetActive(false); LabelLogout.gameObject.SetActive(true); } void OnClick() { Toggle(); } public bool Check; void Toggle() { Check = !Check; if (Check) { LabelLogin.gameObject.SetActive(true); LabelLogout.gameObject.SetActive(false); } else { LabelLogin.gameObject.SetActive(false); LabelLogout.gameObject.SetActive(true); } } }