UMA Integration

siendel

New member
Not sure if anyone else has tried integrating UMA with UCC and UIS, but I didn't see integration yet for equipping clothing on UMAs using UIS.

I created the attached script (which is very basic) but it seems to do the job. You create clothing items like you would other items, but leave the pre-fab as None when creating it using the UCC Item-->New Item. Just update the prefab by adding this script to the newly created prefab and set the UMA wardrobe recipe and slot name. If you need to hide meshes, you just do it on the UMA recipe as you normally would. I've only tested this for third person controller so far (but I see no reason why it wouldn't work for first person arms as well). If someone else has a better solution, please let me know. I've only been working with Unity for a couple weeks so this probably isn't going to be the most efficient way.
 

Attachments

  • UMAEquippable.cs
    1.9 KB · Views: 6
Thank you for sharing your solution @siendel
We'll be working on an official integration with UMA sometime in 2021.

I read your code. Quick tip use
this
Code:
 myOwner = gameObject.GetComponentInParent<DynamicCharacterAvatar>();
instead of this
Code:
myOwner = (DynamicCharacterAvatar)gameObject.GetComponentInParent(typeof(DynamicCharacterAvatar));
 
Thanks for the catch! I thought I had everything working but equipping/unequipping using the default equipper script only works if I use item slot 0 for everything, which obviously doesn't work as I want to be able to wear more than one piece of clothing. I tried adding more item slots, but that didn't seem to work either. I think it has something to do with how the bridge requires and handles the equipmentprefab attribute object while also needing a prefab object.

At this point I'm thinking it'll be much quicker to just add a 'wearable' action and my own clothing equip/unequip scripts.

Oh well. Certainly looking forward to having an official UMA integration, even if it'll probably be too late for this project.
 
Last edited:
I think having a custom item action for equipping your UMA clothes makes sense.
With UCC integration the equipment collection must be dealt with the bridge component and it only works for UCC weapons/items.
So you'd need to create a new item collection for your clothes and any other non-UCC items/weapons anyway
 
I think having a custom item action for equipping your UMA clothes makes sense.
With UCC integration the equipment collection must be dealt with the bridge component and it only works for UCC weapons/items.
So you'd need to create a new item collection for your clothes and any other non-UCC items/weapons anyway
Creating a custom item action and equip script turned out to be pretty easy, and it got me to learn more about how the UIS database system works. Thanks for confirming that this was the way to go!
 
Top