jimi
Member
Hey again,
I'm having some unexpected results with the new equip method.
When you equip a new item, the previous item remains in the Equipable slot item collection which causes the following error when you try and reequip it:
If you add a third item sometimes it replaces the 1st, sometimes the second. Both items show up as equipped in the hotbar as well ass the itemActionEquipUnequip menu.
This is how I am equipping
The character has only one slot. and this is what the ItemSet Manager looks like
I'm having some unexpected results with the new equip method.
When you equip a new item, the previous item remains in the Equipable slot item collection which causes the following error when you try and reequip it:
1 Axe (2628159038) || ItemCollection Equippable Slots (Equipped) || ItemStack(-1463709952)[ 1 Axe (2628159038) in ItemCollection Equippable Slots (Equipped)] cannot be moved to equippable because it was not in default first.
UnityEngine.Debug:LogWarning (object,UnityEngine.Object)
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.CharacterInventoryBridge:MoveItemToEquippable (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo,int,int) (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Scripts/CharacterInventoryBridge.cs:350)
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.CharacterInventoryBridge:MoveEquip (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo,int,int,bool) (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Scripts/CharacterInventoryBridge.cs:457)
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.CharacterInventoryBridge:MoveEquip (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo,bool) (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Scripts/CharacterInventoryBridge.cs:443)
LogMenuUI:CrossCut () (at Assets/LogMenuUI.cs:66)
UnityEngine.EventSystems.EventSystem:Update () (at C:/Unity/2019.4.24f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:377)
If you add a third item sometimes it replaces the 1st, sometimes the second. Both items show up as equipped in the hotbar as well ass the itemActionEquipUnequip menu.
This is how I am equipping
Code:
public DynamicItemDefinition CrosscutItem;
var Ripsaw = Inventory.GetItemInfo(CrosscutItem);
//UCCBridge.UnequipItem(0);
if (UCCBridge.EquippableCategory.InherentlyContains(Ripsaw.Value.Item))
{
UCCBridge.MoveEquip(Ripsaw.Value, true);
}
The character has only one slot. and this is what the ItemSet Manager looks like