public void logic() { GameObject link = transform.FindChild("inputer").gameObject; if (link != null) { UIPopupList selectList = transform.GetComponent <UIPopupList>(); Transform label_tran = transform.FindChild("Label"); if (selectList.value.Equals("其他文交所") || selectList.value.Equals("其他") || selectList.value.Equals("其他银行")) { link.SetActive(true); if (label_tran != null) { label_tran.gameObject.SetActive(false); } MyUtilTools.ChangeLayer(link, gameObject.layer); } else { if (label_tran != null) { label_tran.gameObject.SetActive(true); } link.SetActive(false); } } }
public void run() { MyUtilTools.ChangeLayer(target_obj, layer); }