In the integrated demo with UIS, I cannot find anywhere to set up the rifle to display in Holster.
I tried to add a rifle to the Equippable collection, the rifle appeared in the holster but the holster was not active. As far as I know, when it is initialized, it is attached with:
and is only activated again when the Pickup() function is called. But InventoryBase did not call:
the
I tried to add a rifle to the Equippable collection, the rifle appeared in the holster but the holster was not active. As far as I know, when it is initialized, it is attached with:
if (HolsterTarget != null) {
// The holster target will be enabled when the item is picked up.
HolsterTarget.gameObject.SetActive(false);
}
and is only activated again when the Pickup() function is called. But InventoryBase did not call:
if (slotID != -1) {
var item = GetCharacterItem(itemIdentifier, slotID);
if (item != null) {
item.Pickup();
EventHandler.ExecuteEvent(m_GameObject, "OnInventoryPickupItem", item, amount, immediatePickup, forceEquip);
if (m_OnPickupItemEvent != null) {
m_OnPickupItemEvent.Invoke(item, amount, immediatePickup, forceEquip);
}
}
}
the
var item = GetCharacterItem(itemIdentifier, slotID)
is null, so I don't know why.