How to correctly drop a prefab item from CharacterItem?

EVG

Member
In version 2 I did it like this:
C#:
        var activeEquippedItemInSlot0 = characterInventoryBridge.GetActiveInventoryItem(0);
        var droppedGO = characterInventoryBridge.
                                DropItem(characterInventoryBridge.Inventory.GetItemInfo(activeEquippedItemInSlot0).Value, true, true).gameObject;
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:
C#:
        var activeEquippedItemInSlot0 = characterInventoryBridge.GetActiveCharacterItem(0);
        var droppedGO = characterInventoryBridge.DropCharacterItem(activeEquippedItemInSlot0, 1, true, true);
But now droppedGO returns null, and that doesn't work for me.
And when trying to drop using this code:
C#:
        var droppedGO = characterInventoryBridge.DropCharacterItem(activeEquippedItemInSlot0, 1, true, false);
But then the item is not removed from the hands.

How can I do this correctly?
 
Back
Top