tuirennder
New member
Hello!
I have a weird issue where runtime pickup only works for my melee weapon when I set a _wrong_ item collection in the Item Set Manager.
Working setup:
As you can see above, the item type Sword_demo_type that I use everywhere is not in the collection I reference in the Item Set Manager. I also manually populate
the Item Set 0.
Surprisingly, like this it works, the sword is equiped and usable without errors:
Now if I try to do what I believe is the good way, using the correct item collection and leaving the Item Set empty:
... after going through the pickup item, I get this index out of range error:
We see the prefab added to the character, we see the item in the inventory, but the prefab remains inactive:
Thanks for reading. I can share the scene if needed.
I have a weird issue where runtime pickup only works for my melee weapon when I set a _wrong_ item collection in the Item Set Manager.
Working setup:
As you can see above, the item type Sword_demo_type that I use everywhere is not in the collection I reference in the Item Set Manager. I also manually populate
the Item Set 0.
Surprisingly, like this it works, the sword is equiped and usable without errors:
Now if I try to do what I believe is the good way, using the correct item collection and leaving the Item Set empty:
... after going through the pickup item, I get this index out of range error:
Code:
IndexOutOfRangeException: Array index is out of range.
Opsive.UltimateCharacterController.Inventory.ItemSetManager.GetEquipItemType (Int32 categoryIndex, Int32 targetItemSetIndex, Int32 slot) (at Assets/Opsive/UltimateCharacterController/Scripts/Inventory/ItemSetManager.cs:465)
Opsive.UltimateCharacterController.Character.Abilities.Items.EquipUnequip.Update () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/Abilities/Items/EquipUnequip.cs:488)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion.UpdateAbilities (Opsive.UltimateCharacterController.Character.Abilities.Ability[] abilities) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:716)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion.UpdateUltimateLocomotion () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:643)
Opsive.UltimateCharacterController.Character.CharacterLocomotion.Move (Single horizontalMovement, Single forwardMovement, Single deltaYawRotation) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterLocomotion.cs:455)
Opsive.UltimateCharacterController.Game.DeterministicObjectManager+DeterministicCharacter.FixedMove () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/DeterministicObjectManager.cs:146)
Opsive.UltimateCharacterController.Game.DeterministicObjectManager.FixedUpdate () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/DeterministicObjectManager.cs:589)
We see the prefab added to the character, we see the item in the inventory, but the prefab remains inactive:
Thanks for reading. I can share the scene if needed.