EVG
Member
In version 2 I did it like this:
In version 2 everything worked fine, but after updating to version 3 there were difficulties. When trying to drop using the same code, it drops the prefab from CharacterInventoryBridge -> InventoryItemPickupPrefab, although the DropUsingCharacterItemWhenPossible option is selected.
I tried to change the code a little:
But now droppedGO returns null, and that doesn't work for me.
And when trying to drop using this code:
But then the item is not removed from the hands.
How can I do this correctly?
C#:
var activeEquippedItemInSlot0 = characterInventoryBridge.GetActiveInventoryItem(0);
var droppedGO = characterInventoryBridge.
DropItem(characterInventoryBridge.Inventory.GetItemInfo(activeEquippedItemInSlot0).Value, true, true).gameObject;
I tried to change the code a little:
C#:
var activeEquippedItemInSlot0 = characterInventoryBridge.GetActiveCharacterItem(0);
var droppedGO = characterInventoryBridge.DropCharacterItem(activeEquippedItemInSlot0, 1, true, true);
And when trying to drop using this code:
C#:
var droppedGO = characterInventoryBridge.DropCharacterItem(activeEquippedItemInSlot0, 1, true, false);
How can I do this correctly?