public void ValueChanged() { if (toggle == null) { toggle = transform.gameObject.GetComponent <Toggle>(); } otherToggle.isOn = !toggle.isOn; if (toggle.isOn) { GetComponentInChildren <Image>().sprite = on; if (gestureCrossSection != null) { gestureCrossSection.toggle(); } } else { GetComponentInChildren <Image>().sprite = off; } }
public void toggleCrossSection() { gestureCrossSection.toggle(); }