public void researchTech() { string techName = hiddenTechName.text; Debug.Log(techName); Technology tech = State.GetTechnologies()[techName]; App app = UnityEngine.Object.FindObjectOfType <App>(); Nation player = State.getNations()[app.GetHumanIndex()]; PlayerPayer.PayForTechnology(player, techName); PlayerReceiver.addNewTech(player, tech); PlayerReceiver.registerTechChanges(tech, player); tech.SetDiscovered(true); tech.SetDiscoveredBy(player.getIndex()); research.interactable = false; researchPoints.text = player.Research.ToString(); numberPattents.text = player.getNumberPattents().ToString(); GameObject buttonOfResearchedTech = GetChildWithName.getChildWithName(techTreeConnector, tech.GetTechName()); Image image = buttonOfResearchedTech.GetComponent <Image>(); image.sprite = Resources.Load("AlchemistUITools/SteamContent/Sprites/Buttons/QuadroBtnBg", typeof(Sprite)) as Sprite; RectTransform imageTransform = image.rectTransform; imageTransform.ForceUpdateRectTransforms(); uI_updater.updateUI(); }