public void ShowClues(GameObject o) { Transform pannelobject = o.transform.GetChild(2).transform; Debug.Log(pannelobject.name); foreach (Transform child in pannelobject) { child.gameObject.SetActive(false); } HashSet <Clue> clues = CluesFolder.GetCluesFolder().GetClues(); int i = 0; foreach (Clue c in clues) { pannelobject.GetChild(i).GetComponentsInChildren <Image>()[0].sprite = c.GetImage(); pannelobject.GetChild(i).GetComponentsInChildren <Text>()[0].text = c.GetName().ToUpper(); pannelobject.GetChild(i).gameObject.SetActive(true); i++; } o.SetActive(true); }
// Start is called before the first frame update void Start() { instance = this; allClues = GetComponentsInChildren <Clue>(); }