All weapons equip at once and dissapear from the inventory when trying to dual wield

So I have a few weapons ( single ) working with the inventory (TPC and UIS). All three will show up in the inventory, shoot reload and equip/unequip just fine. Now 'm trying to add a dual wield pistol and its breaking everything. I've created a pistol definition that inherits from the multi-item category so i can have two prefabs. I have the two prefabs made, one for the right hand and one for the left hand.

I've been looking through the UIs/UCC integration demo scene and trying to make everything just as it is in the demo scene. I have the item set in the item sets manager and the items set into the "Loadout" item collection.

When I get into play mode it starts out normal. I have the default single pistol in one hand equipped. Then when I try to switch weapons it all breaks and none of the weapons unequip and the visual prefabs just stack on my characters right hand. I don't even see a second prefab for the dual wields. I can no longer switch back or toggle equip. As well the items disappear from my actual inventory when they were there in the first place.

I have an item view slot setup for my weapon category which both single and multi item categories inherit from.

I've searched the internet, these forums and the demo scene and cannot get this figured out.
 
It sounds like there are issues with your character inventory or something isn't setup correctly and breaks it.

Double check that the "Ultimate Inventory System Bridge" references ItemCategories from your Inventory Database, not the demo.
Do the same for the ItemDefinitions in the "Inventory System Item Set Manager"

Make sure that the ItemSet for double pistol is above the single pistol one. And double check that you have the "DualPistols" state name for that Item Set
1612432514391.png

Make sure that your prefabs for right and left pistols are setup correctly and that the dominant pistol (right hand) points to the correct Item Definition from your Inventory database.

Right Pistol Prefab
1612432692138.png

Left Pistol Prefab:
1612432723634.png

I hope that helps.
 
Thank you for the replay, this gave me a few things to change but my references were all good. I changed a few things about the prefabs to match what you showed me and I still have the same problem.

I've attached screen shots of my players inventory, both prefabs, the item objects on the prefab (I posted only one because they're both the same) as well as the item category I'm using for the multi wield.

Within the inventory script i've tried having both one "Dual Pistol" items set into the "Loadout" collection before running the game as well as two of them and that didnt change either.
 

Attachments

  • DualPistolItemCategory.png
    DualPistolItemCategory.png
    88.6 KB · Views: 6
  • inventoryduals.png
    inventoryduals.png
    62.7 KB · Views: 5
  • itemobject.png
    itemobject.png
    35.6 KB · Views: 5
Here's the rest of the screen shots.
 

Attachments

  • ItemSetManagerDualPistol.png
    ItemSetManagerDualPistol.png
    71.7 KB · Views: 12
  • LeftPistolItem.png
    LeftPistolItem.png
    48.9 KB · Views: 10
  • RightPistolprefab.png
    RightPistolprefab.png
    49.8 KB · Views: 11
And here is one last shot of the player having multiple visual guns equipped at one time. This happens after I try to equip the next weapon. When the game starts the initial weapon equipped works good until i try to switch weapons.

This only happens if I have the dual wield items and item set loaded in. If i take all that out the single item equipped weapons work perfectly fine.
 

Attachments

  • BothItemsDisplayed.png
    BothItemsDisplayed.png
    155.8 KB · Views: 9
That's weird...

Can you double check that you are using the latest UCC (2.2.8) and UIS (1.1.4) and integration versions? Make sure to check in our Editor Managers in the bottom left of the "Welcome" Menu and not the Unity Pacakage Manager (sometimes to pacakage manager says the latest version is installed when it is not)

Also are you getting any errors/warnings in the console?
Can you double check that your ItemSet (in the Equipped ItemSlotCollection) is correctly setup to wield two items.
 
Ok so I updated the Inventory system and the TPC to the newest versions. This caused a GUI error with a couple of the scripts and prefabs, so I had to delete and reimport those files along with their Meta's and that solved the GUI/reference error.

I've gone into the equippable item slot collection and added the "LeftHand" item and set the category to my Dual Pistols category. The collection did only have the "Right Hand" set, so now it has both.

I setup the prefab for the weapons as you showed, made sure the references are all there and set to the proper database.

I was thinking that it could be something with the item abilities so I went through and referenced the demo scene organization of the Item Abilities in the Locomotion script, this solved the multiple weapons piling onto each other and also disappearing from the inventory.

Now I have the guns equipping but both parented on the right hand. have the second one set to Item Slot 1, I have the "Item Slot" script on my players left hand and the equippable category has a left hand slot 1 slot.

Not sure why the second one won't go to the left hand
 
Last edited:
Alright it looks like I got it working. I went into the "Inventory" script and set the amount of the item definition of "DualPistols" to 2. Then I was looking through the left pistol prefab from the demo and saw the "Parent to Humanoid Bone" option in the third person perspective script and changed that to "Left Hand" as it was still set to the right hand.

Now it works, so thank you.

But just a quick question, I have the dual pistol item set in the item set manager. I DO NOT have an item set for the single pistol in one hand, only for the duals in both hands. Yet it still adds one of the pistols as a single weapon in one hand. I'm not sure why its happening but I only want the player to have both as a dual wield set not as a single pistol weapon
 
Glad you're making progress. The new Item Set will automatically be added with just a single Item Definition but you can prevent that by deselecting Unique Item Set on the Item component.
 
Top