public void Start() { unitName = GetComponentInChildren <UnitName>(); unitPortrait = GetComponentInChildren <UnitPortrait>(); unitHealth = GetComponentInChildren <UnitHealth>(); unitStats = GetComponentInChildren <UnitStats>(); activeName = unitName.GetComponent <Text>(); healthSlider = unitHealth.GetComponent <Slider>(); activePortrait = unitPortrait.GetComponent <Image>(); stat1Description = unitStats.GetComponentsInChildren <Text>().FirstOrDefault(s => s.text.Equals(stat1DescriptionText)); stat2Description = unitStats.GetComponentsInChildren <Text>().FirstOrDefault(s => s.text.Equals(stat2DescriptionText)); stat3Description = unitStats.GetComponentsInChildren <Text>().FirstOrDefault(s => s.text.Equals(stat3DescriptionText)); stat4Description = unitStats.GetComponentsInChildren <Text>().FirstOrDefault(s => s.text.Equals(stat4DescriptionText)); stat1Value = stat1Description.GetComponentsInChildren <Text>().FirstOrDefault(s => s.text.Equals("100")); stat2Value = stat2Description.GetComponentsInChildren <Text>().FirstOrDefault(s => s.text.Equals("100")); stat3Value = stat3Description.GetComponentsInChildren <Text>().FirstOrDefault(s => s.text.Equals("100")); stat4Value = stat4Description.GetComponentsInChildren <Text>().FirstOrDefault(s => s.text.Equals("100")); }