public void SetUnitScoutingRangeInfo(PartyUnit partyUnit) { // Get move points text Text attributeText = transform.Find("Panel/LeaderAttributes/Values/ScoutingRange").GetComponent <Text>(); // display effective scouting range attributeText.text = partyUnit.GetEffectiveScoutingRange().ToString(); // verify if base scouting range does not equal to effective scouting range if (partyUnit.GetEffectiveScoutingRange() != partyUnit.ScoutingRange) { // Display how scouting range is calculated // open brackets attributeText.text += "("; // set base unit move points without bonuses attributeText.text += baseStatPreviewStyleStart + partyUnit.ScoutingRange.ToString() + baseStatPreviewStyleEnd; // get and add skill bonus to text AddBonusInfoToText(attributeText, partyUnit.GetScoutingSkillBonus(), skillBonusPreviewStyleStart, skillBonusPreviewStyleEnd); // get and add bonus from items to text AddBonusInfoToText(attributeText, partyUnit.GetScoutingPointsItemsBonus(), itemBonusPreviewStyleStart, itemBonusPreviewStyleEnd); // close brackets attributeText.text += ")"; } }