// Use this for initialization void Start() { talentPanel = GameObject.Find("Talent Panel"); talentChoice = talentPanel.GetComponent <TalentUI>(); player = GameObject.Find("Player").GetComponent <PlayerController>(); stats = GameObject.Find("Player").GetComponent <PlayerStats>(); for (int i = 0; i < talentBtns.Length; i++) { talentBtns[i] = GameObject.Find("Talent Btn Panel").gameObject.transform.GetChild(i).GetComponent <Button>(); } Invoke("Hide", 0.1f); }
private void Awake() { parent = GetComponentInParent <TalentUI>(); text = GetComponentInChildren <TMPro.TextMeshProUGUI>(); image = GetComponentInChildren <Image>(); }