UCC Integration

torrefaction

New member
I'm struggling a bit with the UCC integration so far. Everything seems okayish until I add the system bridge component. It chokes right after start on initialization. I haven't even gotten to the point of adding items, outside of attempting to follow the demoscript using the empty database. Once I add the components for inventory to my character, everything chokes. I'm instantiating my characters at runtime, which may add some complexity. But I tried to convert that UMA model to a static character with bones and hit the same issue. Something about abilities/locomotion seems to fundamentally break when I add the components. The camera that attached fine no longer attaches to the character.

My first major error is here:
Code:
NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.UltimateInventorySystemBridge.Start () (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Scripts/UltimateInventorySystemBridge.cs:152)


Which is right here for me
Code:
            m_EquipUnequipAbilities = characterLocomotion.GetAbilities<EquipUnequip>();
 
Hi @torrefaction
The error suggests that the bridge component did not find the character locomotion component.

Make sure to have a look at this video tutorial for the integration:

My guess is that your character is missing some components, or has components it shouldn't have. Normally in the integration manager there is a field where you may drag your pure UCC character and it will convert it to a UCC/UIS character by replacing and adding some components required by the integration.

If you prefer to do it automatically I would open two inspector tabs and compare your character with the integration demo character.
 
I'll check it out, but locomotion works just fine until the moment I add the bridge. I have both A* with behavior designer navigating AI as well as UCC working fine on the Avatar. The second I add the bridge, the scene goes kinda haywire.

I tried it with that conversion method you described as well, which is why I created the bones/character in the first place. Normally, they're just instantiated with the character builder and ability add scripts from UCC. That video tutorial is where I'm working from, but as it stands, this is all breaking obscure and unfriendly way.
 
So, I see some areas things may be going wrong, but I'm not certain of the right approach to take. I'm using UCC with the UMA Integration.

I'm using UMA Character Builder fine, but the problem is the character builder adds both the item structure and traditional inventory, and doesn't separate the work. I could do this, but that got sorta deep into me mucking with the integration scripts from y'all.

That seemed less than optimal, since all the solutions are coming from the same place. Maybe the UMA integration could be modified to consider Ultimate Inventory? I dug into it, and it seemed like something I could accomplish, but I'm not certain I'd be going about things the right way. It seems like just adding an option that separates out the item components vs the item support would be the right approach, but I'm not entirely certain.
 
Right now, my first thought was that I could just replace the base UCC inventory component, but I'm not seeing any examples or obvious ways to add the Inventory component and populate the data and collections. Am I missing something in the documentation around that?
 
After some more experimentation, it DOES look like the problems are rooted in two issues.

1.)Expectations from Ultimate Inventory on the character at start. If I make sure the model exists when the bridge component and/or inventory component are run, I seem to not be hitting those conflicts.
2.)Conflicts with UMA Character Builder with the Ultimate Inventory system. Preloading the inventory onto the character KIND of works, but then the old UMA inventory and item set manager components are just added back to the GameObject.

So far, I couldn't fully resolve the order of operations problem, since I'm not sure how to generate an inventory at runtime. It seems like it would be easy to slide into the same functions if there was a simple "Ultimate Inventory Support" checkbox for UMA, and it let you populate those parameters the same as the rest of the character builder options.
 
Yes, I think are correct.

The UMA Character Builder for UCC adds the UCC Inventory components so what probably needs to happen is that at runtime the same code needs to run from the UCC/UIS setup button, but that's in the editor assembly right now so the easiest way to do the same would be to copy that code and adapt it for runtime

Unfortunatly UIS is not integrated with UMA yet so it won't work. We do have plans for an integration of UIS with UMA in the future though but it is not a priority right now. Our priority is finish v1.1 as soon as it is done we'll start making the integrations with UMA, Rewired, Unity localization, etc...

So if you are unable to wait that long the best would be to edit the UCC/UMA integration code such that it adds the correct components. Have a look at the setup code in the UCC/UIS integration editor manager it will give you an idea of what components are required.

sorry I can't be of more help
 
So, I'm struggling a bit out of the gate with how everything is defined. I feel like I can see the path towards integration, but I keep hitting little quirks.

For instance, I'm trying to call the InventorySystemManager from Character Builder (after being passed from UMACharacterBuilder). I can't seem to load the namespace for UltimateInventorySystem.Core. It appears to link just fine in the IDE, but when I go to run in Unity, it can't see the namespace.

Here's my define in CharacterBuilder.CS, and here's my changes at line 574 of CharacterBuilder.CS (I have changed nothing else).

using Opsive.UltimateInventorySystem.Core;

Code:
 if (character.GetComponent<UltimateCharacterController.Inventory.Inventory>() == null) {
                var inventorySystemManager = Object.FindObjectOfType<InventorySystemManager>();
                var database = inventorySystemManager.m_Database;

            }

And my error:
"Assets\Opsive\UltimateCharacterController\Scripts\Utility\Builders\CharacterBuilder.cs(15,18): error CS0234: The type or namespace name 'UltimateInventorySystem' does not exist in the namespace 'Opsive' (are you missing an assembly reference?)
 
Top