public void SetSlot(GameObject objeto, Slot slot) { lastInventoryPosition = slot.gameObject.transform.position; lastSlotParent = slot.gameObject.transform; this.gameObject.transform.SetParent(slot.gameObject.transform); gameObject.GetComponent <RectTransform>().anchoredPosition = slot.gameObject.GetComponent <RectTransform>().anchoredPosition; _slotStoragePiece = slot; if (_slotStoragePiece.TypeSlot.ToString() == Slot.TypeSlotEnum.Machine.ToString()) { gameController.OcupySlot(this.gameObject, slot.NumSlot); } chageEffective = true; }