public void LevelUp(int level) { Destroy(GetComponent <Weapons>()); Weapons wpns = gameObject.AddComponent <Weapons>() as Weapons; wpns.Wpns = WeaponsPresets[level].Wpns; wpns.Configure(); pickupMan.weapons = wpns; SendMessage("ReApplyBonus", 1); }