Hey Unity! For some reason all my ints are getting doubled any idea why? *For example my health potions should be upped by 1 but they get upped by 2(Same with my gold it should be upped by a number between 5 and 25 and it picks a number between 5 and 25 but then for some reason multiplies it...* Code (csharp): void Start(){ Slot2.onClick.AddListener(CollectHealthPotions); } public void CollectHealthPotions() { Slot2Active = false; //This is a bool! inventorymanager.HealthPotions += 1; Debug.Log("Collected Loot!!"); //Destroy(GameObject.FindWithTag("LootSlot2")); slot2.SetActive(false); }
Maybe the script is attached more than once somewhere in scene? Does it print that debug log once or twice? (note that you might have console window Collapse enabled)