public void OnChangeModeElement(bool isOn) { if (isOn) { Debug.Log(id); if (id == 0) { GeneralRecords.SetActive(true); ModeRecords.SetActive(false); } else { SetModeRecords(); GeneralRecords.SetActive(false); ModeRecords.SetActive(true); } } }
// Update is called once per frame public void OnChangeValueInToggleGroup(Toggle change) { var selected = tggModes.ActiveToggles().First(); var selectedId = (selected != null?selected.GetComponent <ModeElementForRecords>().id:0); if (selectedId == 0) { GeneralRecords.SetActive(true); ModeRecords.SetActive(false); } else { GeneralRecords.SetActive(false); ModeRecords.SetActive(true); } oldSelectedId = selectedId; }