// Start is called before the first frame update void Start() { AddButtonsToList(); playerInventory = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerInventory>(); // Purely for testing purposes, and should be removed when the player is assigned a team normally!!! if (playerInventory.petList.Count < 1) { playerInventory.AddPetToList(GameObject.FindGameObjectWithTag("Player").GetComponent <UnitTeam>().unit1); playerInventory.AddPetToList(GameObject.FindGameObjectWithTag("Player").GetComponent <UnitTeam>().unit2); playerInventory.AddPetToList(GameObject.FindGameObjectWithTag("Player").GetComponent <UnitTeam>().unit3); } }