public void AddHouseToYourList(HouseData theHouse) { GameObject newAssetPanel = Instantiate(gameMasterRef.buyPanelPrefab, transform.position = new Vector3(0, 0, 5), Quaternion.identity, gameMasterRef.contentForYourAssets.transform); theHouse.SetGameObjectOfSelf(newAssetPanel); yourHousesBought.Add(theHouse); newAssetPanel.GetComponent <BuyPanel>().UpdateUI(theHouse, true); }