developer21
Member
Dears,
How to check if the player has specific item in the inventory?
I am trying HasItem(), after getting a component's object from the inventory script, but it requires ItemIdentifier.
Is there a method to get the ItemIdentifier of the item by the item's name?
The problem is that the documentation refers to m_Inventoryobject, but I don't know this object should be of which type?
I tried Inventory and InventoryBase, but when I do call any method in the documentation, such as:
var equipmentItemCollection = m_Inventory.GetItemCollection(m_EquipmentItemCollectionID) as ItemSlotCollection;
It generates an error, that the method GetItemCollection not found on the m_Inventory?
Best regards,
How to check if the player has specific item in the inventory?
I am trying HasItem(), after getting a component's object from the inventory script, but it requires ItemIdentifier.
Is there a method to get the ItemIdentifier of the item by the item's name?
The problem is that the documentation refers to m_Inventoryobject, but I don't know this object should be of which type?
I tried Inventory and InventoryBase, but when I do call any method in the documentation, such as:
var equipmentItemCollection = m_Inventory.GetItemCollection(m_EquipmentItemCollectionID) as ItemSlotCollection;
It generates an error, that the method GetItemCollection not found on the m_Inventory?
Best regards,