void Addinglistener() { for (int i = 0; i < transform.childCount; i++) { int no = Int32.Parse(transform.GetChild(i).GetChild(0).GetComponent <Text>().text); transform.GetChild(i).GetComponent <Button>().onClick.AddListener(() => ManagingTheGame.GetTheLevel(no)); } }
public void SendLevelNumber() { string t = Convert.ToString(no.text); Debug.Log(no.text.ToString()); Debug.Log(t.GetType()); int Levelno = Int32.Parse(t); Debug.Log(Levelno); try { managingTheGame.GetTheLevel(Levelno); } catch (Exception e) { Debug.Log(e.Message + e.Data); } }