public void SetGadget(int index) { if (Gadget) { Destroy(Gadget.gameObject); } Gadget = Instantiate(weaponManager.GetGadget(index), weaponParent); Gadget.Init(player); }