// Use this for initialization public void view(string teamCode) { transform.FindChild("Scroll View").gameObject.SetActive(false); transform.FindChild("Scroll View 1").gameObject.SetActive(false); //if (!transform.FindChild ("Scroll View").gameObject.activeSelf && !transform.FindChild ("Scroll View 1").gameObject.activeSelf) { //} ScrollView = transform.FindChild("Scroll View").gameObject; //ScrollView.GetComponent<UIScrollView> ().ResetPosition (); Reset(); if (fist) { fist = false; pits = ScrollView.transform.GetChild(1).GetChild(0).GetChild(1).transform.localPosition; hits = ScrollView.transform.GetChild(2).GetChild(0).GetChild(1).transform.localPosition; Cpits = ScrollView.transform.GetChild(1).GetChild(0).GetChild(0).transform.localPosition; Chits = ScrollView.transform.GetChild(2).GetChild(0).GetChild(0).transform.localPosition; //Debug.Log("Cpits : " + ScrollView.transform.GetChild (2).GetChild (0).GetChild(1).GetChild(0).transform.localPosition); //Debug.Log("Cpits : " + Cpits); } lineup.Clear(); pit.Clear(); hit.Clear(); buttens = true; for (int i = 0; i < Gpit.Count; i++) { Destroy(Gpit[i].gameObject); } for (int i = 0; i < Ghit.Count; i++) { Destroy(Ghit[i].gameObject); } for (int i = 0; i < Gpit2.Count; i++) { Destroy(Gpit2[i].gameObject); } for (int i = 0; i < Ghit2.Count; i++) { Destroy(Ghit2[i].gameObject); } Gpit.Clear(); Ghit.Clear(); Gpit2.Clear(); Ghit2.Clear(); //Debug.Log ("what teamcode : " + UserMgr.Schedule.extend[0].teamCode); // if (UserMgr.Schedule != null) { for (int i = 0; i < transform.FindChild("Scroll View").GetChild(0).GetChild(0).FindChild("S").childCount; i++) { transform.FindChild("Scroll View").GetChild(0).GetChild(0).FindChild("S").GetChild(i).FindChild("image").GetChild(0) .GetComponent <UITexture>().mainTexture = Non; transform.FindChild("Scroll View").GetChild(0).GetChild(0).FindChild("S").GetChild(i).FindChild("G").GetChild(0).GetChild(0) .GetComponent <UILabel>().text = ""; } transform.FindChild("Scroll View").GetChild(1).GetChild(0).FindChild("bar origin").FindChild("S1").FindChild("image").GetChild(0) .GetComponent <UITexture>().mainTexture = Non; transform.FindChild("Scroll View").GetChild(2).GetChild(0).FindChild("bar origin").FindChild("S1").FindChild("image").GetChild(0) .GetComponent <UITexture>().mainTexture = Non; for (int i = 0; i < transform.FindChild("Scroll View 1").GetChild(0).GetChild(0).FindChild("S").childCount; i++) { transform.FindChild("Scroll View 1").GetChild(0).GetChild(0).FindChild("S").GetChild(i).FindChild("image").GetChild(0) .GetComponent <UITexture>().mainTexture = Non; transform.FindChild("Scroll View 1").GetChild(0).GetChild(0).FindChild("S").GetChild(i).FindChild("G").GetChild(0).GetChild(0) .GetComponent <UILabel>().text = ""; } transform.FindChild("Scroll View 1").GetChild(1).GetChild(0).FindChild("bar origin").FindChild("S1").FindChild("image").GetChild(0) .GetComponent <UITexture>().mainTexture = Non; transform.FindChild("Scroll View 1").GetChild(2).GetChild(0).FindChild("bar origin").FindChild("S1").FindChild("image").GetChild(0) .GetComponent <UITexture>().mainTexture = Non; mlineupEvent = new GetLineupEvent(new EventDelegate(this, "setarrray")); NetMgr.GetLineup(teamCode, mlineupEvent); T1.GetComponent <UILabel> ().text = UtilMgr.GetTeamName(teamCode); // T2.GetComponent<UILabel> ().text = UserMgr.Schedule.extend [1].teamName; // T11.GetComponent<UILabel> ().text = UserMgr.Schedule.extend [0].teamName; // T22.GetComponent<UILabel> ().text = UserMgr.Schedule.extend [1].teamName; // } transform.FindChild("Scroll View").GetComponent <UIScrollView>().ResetPosition(); }