// Used when you want to add avaliable hero to the team in DispalyAndAddToTheTeam private void AddToTeam(int index, Team team) { team.AddCharacter(hero, index); SelectHeroes selectHeroPanel = FindObjectOfType <SelectHeroes>(); selectHeroPanel.PopulatePanel(); selectHeroPanel.gameObject.GetComponent <Animator>().SetTrigger("FadeIn"); GetComponentInParent <Animator>().SetTrigger("FadeOut"); }