void UpdatePersonalityBars() { Personality personality = selectedCar_.GetComponent <Personality>(); float aggression = 0.0f; float defensiveness = 0.0f; float inattentiveness = 0.0f; if (personality) { aggression = personality.GetAggression(); defensiveness = personality.GetDefensiveness(); inattentiveness = personality.GetInattentiveness(); } personalityDisplay.transform.FindChild("Aggression").GetComponent <UIProgressBar>().SetPercentage(aggression); personalityDisplay.transform.FindChild("Defensiveness").GetComponent <UIProgressBar>().SetPercentage(defensiveness); personalityDisplay.transform.FindChild("Inattentiveness").GetComponent <UIProgressBar>().SetPercentage(inattentiveness); }