public static void ReplaceUpgrade(GenericShip host, string oldName, string newName, string newImageUrl) { foreach (Transform upgradeLine in host.InfoPanel.transform.Find("ShipInfo/UpgradesBar").transform) { if (upgradeLine.GetComponent <Text>().text == oldName) { upgradeLine.GetComponent <Text>().text = newName; upgradeLine.GetComponent <Text>().color = Color.white; Tooltips.ReplaceTooltip(upgradeLine.gameObject, newImageUrl); return; } } }