UCC UIS Integration

house

New member
Unity 2022.2.19f1
Ultimate Character Controller 3.0.17p1
Ultimate Inventory System 1.2.19

I have a character that can be male or female and can switch between third and first person view. I'm using inControl for input. Here is my general setup:
player setup.jpg
character equipper.jpg

I have my character, inventory db/item defs and inventory UI setup. When I try to drag and item from my inventory to an equipment slot I get some errors. I have tried two different setups for the item prefab.
1. UCC style setup by importing item through UCC item manager (official UCC UIS integration steps)
ucc item setup.jpg

When I try to add the item I get a slew of errors

add ucc item.jpg
 

Attachments

  • add ucc item first instance.jpg
    add ucc item first instance.jpg
    156.1 KB · Views: 1
I see in this case it attempts to create two instances of the item
add ucc item first instance.jpg
add ucc item second instance.jpg

2. I tried setting up the item according to UIS. A simple skinned mesh and bone ref
uis item setup.jpg

When I attempt to equip the shoe in this case it tries to get a cached component CharacterItem which doesnt exist in this case

add uis item.jpg
 
Ive looked at the official integration docs/videos as well as the setup videos for both UCC and UIS that are relevant. Docs say I should be going with my first setup for the integration. Is this correct? Anything seem wrong in the setup above?
 
So for Weapons and items you want to use via CharacterItem system should go through the Integration system as shown in the integration videos/docs.

For clothes that are skinned to the character then you are required to use the UIS only system. The characterItems from UCC do not support skinned mesh items by default.

So in your case I'm assuming what you actually want is to equip your shoes via UIS only without going through any of the CharacterItem systems.

But first let me answer some of your questions.

1. UCC style setup by importing item through UCC item manager (official UCC UIS integration steps)
When I try to add the item I get a slew of errors
I see in this case it attempts to create two instances of the item
Yeah, that's not normal.

Usually the way it works is that you CharacterItem gameobject stays under the "Items" gameobject. This is where all the logic for the item should reside, like CharacterItemActions, etc...

Then there is the Visible item, that's just the mesh that should be under the character hiearchy.

I think the mistake here is that you've set the CharacterItem as the visible item, instead of just the mesh. So it gets duplicated.
And that's what causing all those errors. Because there is a CharacterItem that shouldn't exist. It tries to initialize itslef but it can't find any of the references it needs to intialize properly.

You'll need to look inside those components. They should be pointing to those visible items to function properly
1702632841466.png


But in any case, it won't work as you would expect because the CharacterItems are not skinned by default.

2. I tried setting up the item according to UIS. A simple skinned mesh and bone ref
When I attempt to equip the shoe in this case it tries to get a cached component CharacterItem which doesnt exist in this case

My guess here is that your Shoes are still part of the CharacterItem "Equippable" category. So the CharacterInventoryBridge system is trying to equip them as a CharacterItem.
Try creating a new ItemCategory specific for clothing Items that does not inherit the CharacterItem "Equppable" category (the Character Equippable categoy is defined on the CharacterInventoryBridge).

You might also need to make a seperate Equipment ItemSlotCollection in your UIS inventory, but I'm not 100% sure that will be necessary


I hope that helps!
 
Ah, and I forgot about Male and Female switching.
The UIS Equipper does not have any indication of the switching, so I'm afraid it won't show up on the other character when switching.

Depending on your game design it might not be a problem.

My suggestion is having two UIS Equipper components, One for male and another for female. And they'll each visually equip the item on their respective character.

If you have any issues with that let me know.
 
My guess here is that your Shoes are still part of the CharacterItem "Equippable" category. So the CharacterInventoryBridge system is trying to equip them as a CharacterItem.
Try creating a new ItemCategory specific for clothing Items that does not inherit the CharacterItem "Equppable" category (the Character Equippable categoy is defined on the CharacterInventoryBridge).

Thank you for the insight, this seemed to be the main issue. Since all of my items so far have been clothing/cosmetic I changed the Equippable Category on my Character Inventory Bridge to my 'Item_Weapon' category, updated prefabs and that resolved all the console errors.

Good to know on the character switching, I had already setup different equipper components for each and user cannot switch genders at runtime so no need for any extra work there.

Thanks again!
 
Top