UIS & UCC

zroc

Member
First and foremost wanted to say that Opsive and the UIS team has done an incredibly awesome job with UIS and the integration for UCC. Still stumbling on UIS as it's truly the first I've touched since purchasing at first launch. Anyhow... Versions are both current (UIS-1.0.8 & UCC-2.3.5)

I also want to add that what issue(s) I am experiencing are prob me, but never know so....

So my issue is this. So I can understand the flow and logic better, I duplicated the demo integration scene. Unpacked the Nolan char and re-saved it as tmp prefab for this scene, etc.. Because everything is already pre-set from the demo scene, now my duplicated scene, I proceeded to duplicate the DemoIntegrationInventorydb and itemsetcollection. However after doing this there are always issues when you first click into the character GO where it tells me 1 or 2 Warnings in the inspector. First is that there are objects in the collection that don't match the inventory. The second is that slot2 does not match. I can select to convert objects and things seem okay, but after de-selecting the char and then re-selecting the char, those warnings or cautions come back. Before going into play-mode, I check all the inventory components and update respective fields that want/need the duplicated database I performed earlier. I then go to the "Game" GO and update the inventory field to the new duplicated inventorydb and also select the 'update scene' button to make sure there are no disconnects or I missed something...

I then proceed to go into play-mode regardless of above, for the most part everything is working. However I continue to get this error:
The object "Melee Body" with ID 703019062 is not part of the active database. Please run the 'Replace Database Objects' script by right-clicking on the folder with the affected prefabs, scriptable objects, or scenes.
I assume the 'Replace Database Objects' is the same as what I was saying above with "Convert Objects Button" in the inspector. So something is not updating or converting properly when that's used.

Any suggestions on what could be wrong or what I'm doing wrong?
Thanks for your time and keep up the awesome work.
 
Hi Zroc,
The "Update Scene" or "Replace Database Objects" buttons only work on components that were specifically programmed to be able to change objects to another database.
Somethings in the bridge doesn't allow that because the live in the UCC side of things and don't know anything about UIS. So it is possible that some things need to be fixed manually for the demo.

In some cases we added a DynamicItemDefinition or DynamicItemCategory, that will get the correct ItemDefinition or Category in the database using its name. But that's not the case everywhere.

If you send me the entire warning message I would be able to know where the warning came from and perhaps point you to the right component to look at and manually fix.
If I were you for the Melee Body, I would have a look at the Character Inventory and InventoryItemSetManager perhaps one of them is still referencing to wrong Melee Body.

Also have a look at the "Common Errors" section in the documentation page:

You may have some errors/warnings about the Equip/Unequip abilities
 
Hi Zroc,
The "Update Scene" or "Replace Database Objects" buttons only work on components that were specifically programmed to be able to change objects to another database.
Somethings in the bridge doesn't allow that because the live in the UCC side of things and don't know anything about UIS. So it is possible that some things need to be fixed manually for the demo.

In some cases we added a DynamicItemDefinition or DynamicItemCategory, that will get the correct ItemDefinition or Category in the database using its name. But that's not the case everywhere.

If you send me the entire warning message I would be able to know where the warning came from and perhaps point you to the right component to look at and manually fix.
If I were you for the Melee Body, I would have a look at the Character Inventory and InventoryItemSetManager perhaps one of them is still referencing to wrong Melee Body.

Also have a look at the "Common Errors" section in the documentation page:

You may have some errors/warnings about the Equip/Unequip abilities
Hey Sangemdoko,

[EDIT]: I solved the issues. The Body Prefab needed to be updated to the proper DB. So I duplicated all the item prefabs, etc and updated respectively and updated the character as well as my duplicated Inv Db and all is now working... My bad man. Sorry to have wasted your time in my readings...

Question. Whats the best way to make the Body so it can not be dropped?

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Thanks for the response. I will take a look at Characters Inventory and see what I can find. As for the full error that comes up, here she is:
The object "Melee Body" with ID 703019062 is not part of the active database. Please run the 'Replace Database Objects' script by right-clicking on the folder with the affected prefabs, scriptable objects, or scenes.
0x00007FF60A3F371C (Unity) StackWalker::GetCurrentCallstack
0x00007FF60A3F76D1 (Unity) StackWalker::ShowCallstack
0x00007FF608A7E4D5 (Unity) GetStacktrace
0x00007FF60B08939E (Unity) DebugStringToFile
0x00007FF60A452D21 (Unity) DebugLogHandler_CUSTOM_Internal_Log
0x00000124B742697B (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
0x00000124B742681B (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
0x00000124B7425D3E (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
0x000001255594B18A (Mono JIT Code) UnityEngine.Debug:LogError (object)
0x00000124B75070A3 (Mono JIT Code) [ObjectCategoryBase.cs:493] Opsive.UltimateInventorySystem.Core.ObjectCategoryBase`2<Tc_REF, Te_REF>:InherentlyContains (Te_REF,bool)
0x00000124B7506E23 (Mono JIT Code) [ItemCategory.cs:1004] Opsive.UltimateInventorySystem.Core.ItemCategory:InherentlyContains (Opsive.UltimateInventorySystem.Core.Item,bool)
0x000001255594AD1B (Mono JIT Code) [ItemBinding.cs:195] Opsive.UltimateInventorySystem.Core.ItemBinding:SetItem (Opsive.UltimateInventorySystem.Core.Item)
0x000001255594A8DB (Mono JIT Code) [ItemBinding.cs:106] Opsive.UltimateInventorySystem.Core.ItemBinding:SetItemObject (Opsive.UltimateInventorySystem.Core.ItemObject)
0x000001255594A0D2 (Mono JIT Code) [ItemBinding.cs:60] Opsive.UltimateInventorySystem.Core.ItemBinding:Start ()
0x000001257577E8C8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007FFD9E07E270 (mono-2.0-bdwgc) [mini-runtime.c:2809] mono_jit_runtime_invoke
0x00007FFD9E002AE2 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke
0x00007FFD9E00BB3F (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke
0x00007FF60A36589E (Unity) scripting_method_invoke
0x00007FF60A35F75D (Unity) ScriptingInvocation::Invoke
0x00007FF60A32E2A2 (Unity) MonoBehaviour::InvokeMethodOrCoroutineChecked
0x00007FF60A32E3D8 (Unity) MonoBehaviour::InvokeMethodOrCoroutineChecked
0x00007FF60A329EC2 (Unity) MonoBehaviour::DelayedStartCall
0x00007FF6099C2678 (Unity) DelayedCallManager::Update
0x00007FF609E00F98 (Unity) `InitPlayerLoopCallbacks'::`2'::FixedUpdateScriptRunDelayedFixedFrameRateRegistrator::Forward
0x00007FF609DEACE8 (Unity) ExecutePlayerLoop
0x00007FF609DEADBD (Unity) ExecutePlayerLoop
0x00007FF609DF004C (Unity) PlayerLoop
0x00007FF6081152EC (Unity) PlayerLoopController::UpdateScene
0x00007FF6080FDF6D (Unity) PlayerLoopController::EnterPlayMode
0x00007FF608110845 (Unity) PlayerLoopController::SetIsPlaying
0x00007FF608113522 (Unity) Application::TickTimer
0x00007FF608AA3EE5 (Unity) MainMessageLoop
0x00007FF608AAE0C8 (Unity) WinMain
0x00007FF60BB4F262 (Unity) __scrt_common_main_seh
0x00007FFE14807034 (KERNEL32) BaseThreadInitThunk
0x00007FFE15C42651 (ntdll) RtlUserThreadStart

In terms of other errors or warnings/issue, I receive on 2 total warnings, one related to UCC not have the character assigned to the camera controller at start and that it will be auto-assigned;- normal
uis-ucc.png

The other warning is in reference to the Item specified (Body (2103875851)) not matching the item category that was set on the binding (Melee Body). Obviously this is being thrown due to the above error taking place first, I assume.
The crazy thing is that I would thing none of this would be an issue as I state I just duplicated the database and the itemsetrulesobject per the guide instructions using the gear at the top of the UIS Manager.
 
Last edited:
Ah no problem, I should have thought about that.

As for not dropping the Body, what I do is hide it in the UI. You can use a filter in the UI to hide items by collection, by item category or by any custom condition you make.
1627889824645.png

If you want to show your Body Item in the UI but do not want the Drop Action to be used on it, you can use an exception Item Category in the ItemAction Set.
1627889877466.png
 
Ah no problem, I should have thought about that.

As for not dropping the Body, what I do is hide it in the UI. You can use a filter in the UI to hide items by collection, by item category or by any custom condition you make.
View attachment 6688

If you want to show your Body Item in the UI but do not want the Drop Action to be used on it, you can use an exception Item Category in the ItemAction Set.
View attachment 6689
Thanks much for the quick tip I will check it out.
 
Still having major issues when duplicating the IntegrationDemoDB for my projects Db, so I just reverted back to the integrationdemoDb and will use that but will have issues when you push updates out if anything changes with that db.

Outside of this wanted to ask you as I'm fooling around with the FullLayout UI from the integration demo and want to basically use that and modify what I need and don't need for my ui. I have my ui completely done just have to plug-in mine into the uischema layout. So as a quick test I figured the easiest to mess around with would be the hotbar. So I duplicated a few hotbar item view slots. Success there. But when I went to change the background image of the hotbar to mine, it does not change and stays the constant greyscale the demoui has. I feel like such a noob.... lol.. What I am doing wrong with the image updates? Thanks again for your time man...
 
I would highly recommend you create your own inventory database. Or at least if you really want to use the demo database, import the asset in another project, move things to another director, export and re-import in your current project. This way at least you have other guids and updating the asset won't break your changes to the items/database.

For your UI, my guess is that you are changing things in the Scene but then the background gets replaced at runtime when the ItemView prefabs are spawned.
I would recommend you have a look at this video (Have a look at the previous ones too if you haven't done so yet):

Then look at the UI documentation:

I hope that helps
 
Sange,

OK. Been working on trying to duplicate the IntegrationDemoDB to initially setup/alter into new DB for my project. As stated in prior posts get nothing but null references and warnings after the duplication process is completed. Manage to work through most of them and try things out. Still have more to work through but getting this one now:

NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.Demo.WeaponAmmoItemViewModule.UseAmmoAttribute (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo info) (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Demo/Scripts/WeaponAmmoItemViewModule.cs:124)
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.Demo.WeaponAmmoItemViewModule.DrawAmmo (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo info) (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Demo/Scripts/WeaponAmmoItemViewModule.cs:73)
Opsive.UltimateCharacterController.Integrations.UltimateInventorySystem.Demo.WeaponAmmoItemViewModule.SetValue (Opsive.UltimateInventorySystem.Core.DataStructures.ItemInfo info) (at Assets/Opsive/UltimateCharacterController/Integrations/UltimateInventorySystem/Demo/Scripts/WeaponAmmoItemViewModule.cs:49)
Opsive.UltimateInventorySystem.UI.Views.View`1[T].SetValue (T newValue) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Views/View.cs:205)
Opsive.UltimateInventorySystem.UI.Views.ViewDrawer`1[T].DrawingView (System.Int32 index, Opsive.UltimateInventorySystem.UI.Views.View`1[T] view, T element) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Views/ViewDrawer.cs:385)
Opsive.UltimateInventorySystem.UI.Views.ViewDrawer`1[T].DrawView (System.Int32 viewIndex, System.Int32 elementIndex, T element) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Views/ViewDrawer.cs:280)
Opsive.UltimateInventorySystem.UI.Views.ViewDrawer`1[T].DrawViews (System.Int32 startIndex, System.Int32 endIndex, System.Collections.Generic.IReadOnlyList`1[T] elements) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Views/ViewDrawer.cs:238)
Opsive.UltimateInventorySystem.UI.Grid.GridGeneric`1[T].DrawInternal () (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Grid/GridGeneric.cs:304)
Opsive.UltimateInventorySystem.UI.Grid.GridBase.Draw () (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Grid/GridBase.cs:311)
Opsive.UltimateInventorySystem.UI.Item.InventoryGrid.DrawInternal () (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Item/InventoryGrid.cs:205)
Opsive.UltimateInventorySystem.UI.Item.ItemViewSlotsContainerBase.Draw () (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Item/ItemViewSlotsContainerBase.cs:624)
Opsive.UltimateInventorySystem.UI.Panels.ItemViewSlotContainers.ItemViewSlotsContainerPanelBinding.OnOpen () (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Panels/ItemViewSlotContainers/ItemViewSlotsContainerPanelBinding.cs:99)
Opsive.UltimateInventorySystem.UI.Panels.DisplayPanel.OpenInternal () (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Panels/DisplayPanel.cs:305)
Opsive.UltimateInventorySystem.UI.Panels.DisplayPanel.Open (Opsive.UltimateInventorySystem.UI.Panels.DisplayPanel previousPanel, UnityEngine.UI.Selectable previousSelectable, System.Boolean selectDefault) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Panels/DisplayPanel.cs:249)
Opsive.UltimateInventorySystem.UI.MainMenu.OpenSubPanel (System.Int32 index) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/MainMenu.cs:128)
Opsive.UltimateInventorySystem.UI.MainMenu.OnOpen () (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/MainMenu.cs:97)
Opsive.UltimateInventorySystem.UI.Panels.DisplayPanel.OpenInternal () (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Panels/DisplayPanel.cs:305)
Opsive.UltimateInventorySystem.UI.Panels.DisplayPanel.Open (Opsive.UltimateInventorySystem.UI.Panels.DisplayPanel previousPanel, UnityEngine.UI.Selectable previousSelectable, System.Boolean selectDefault) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Panels/DisplayPanel.cs:249)
Opsive.UltimateInventorySystem.UI.Panels.DisplayPanelManager.OpenPanel (Opsive.UltimateInventorySystem.UI.Panels.DisplayPanel panel) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Panels/DisplayPanelManager.cs:279)
Opsive.UltimateInventorySystem.UI.Panels.DisplayPanelManager.TogglePanel (Opsive.UltimateInventorySystem.UI.Panels.DisplayPanel panel) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Panels/DisplayPanelManager.cs:214)
Opsive.UltimateInventorySystem.UI.Panels.DisplayPanelManager.TogglePanel (System.String uniqueName) (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Panels/DisplayPanelManager.cs:202)
Opsive.UltimateInventorySystem.UI.Panels.DisplayPanelManagerHandler.Update () (at Assets/Opsive/UltimateInventorySystem/Scripts/UI/Panels/DisplayPanelManagerHandler.cs:128)

Just so you have a background on my current duplication process and you don't have re-read earlier posts:
1) Using the Integration Demo UI
2) Opened UIS Manager and used the Gear Icon to Duplicate current DB (IntegrationsDB) to a new DB
3) Duplicated various prefabs from integration folder and integration ui folder and updated respectively to new DB - and/or converted
4) Updated all UI references to new updated prefabs, etc.. to new DB - and/or converted
5) Try things out... Get errors and invalid references. I know there is something I'm missing and I know it's gonna be like pulling teeth for you to tell me the solution. Sorry for that. Just really need some direction from you on key things to look back to that I could be missing. Overall there are so many references through the UI it's overwhelming at times..

Basically, what's happening with this error is it stops further inventory from displaying in the grid as well as the grid just stops forming. For example, go into play mode pop open inventory. 4 inv slots appear with the loadout (sword, fireball, ammo and rifle). Rifle has ???\??? as it's ammo counts which inidicates there is an issue with the AmmoData container or bindings.. I've check at least 20 times those references and what-not and everything is as it suppose to be. What I am missing. But back to display.... As soon as the ammo counts try to calc the error appears and the rest of inv grid stops.

uis_gunammo_issue.png

Whatever guidance you can provide would be grateful!!
 
Looking at the error it would seem you have a null value for your ammo ItemDefinition within your weapon AmmoData attribute. You'll have to fix that manually going through all the ranged weapons in the database and changing their ammo ItemDefinition.

Our Database duplication does not check inside the attributes of the items to know if they reference other items... it would be really inefficient to go through all custom types to dig and search for any object with the object type from the database. If we knew the attribute types in advance it would be easier but users can add any custom types as an attribute.

When converting assets like prefabs in some cases (not all) right-clicking them (or the folder they are in) and then pressing the "Replace Database Objects" can work in converting it.

I think all your steps are correct.

Any error will cause issues somewhere, so you must fix all errors before proceeding with your UI.
 
Looking at the error it would seem you have a null value for your ammo ItemDefinition within your weapon AmmoData attribute. You'll have to fix that manually going through all the ranged weapons in the database and changing their ammo ItemDefinition.
I know. It's too weird. Didn't do anything to any of the item defs before or after duplicating the db....

Our Database duplication does not check inside the attributes of the items to know if they reference other items... it would be really inefficient to go through all custom types to dig and search for any object with the object type from the database. If we knew the attribute types in advance it would be easier but users can add any custom types as an attribute.
I agree, that's a lot of overhead and not necessary. However, I can tell you that there may be an issue with the duplicating process not correctly binding itemdef objects to the duplicated db. I've noticed at least 4+ itemdefs that after duplicating were still bound to the intergrationsdb.

When converting assets like prefabs in some cases (not all) right-clicking them (or the folder they are in) and then pressing the "Replace Database Objects" can work in converting it.
Yup. Got that covered. This be the easy part. lol

Any error will cause issues somewhere, so you must fix all errors before proceeding with your UI.
Hard to pin point the errors when they don't take place until you go into playmode and activate the ui. but I get what your saying...

There is something just not right though. Could be me, donno.... You would think duplicating the DB from within the manager would set the duplicated items and objects to their respective references, etc.. for the most case seems like it does but so many that are not set/updated is where the confusion sets in.. especially when you are trying to learn and understand the logic behind everything to actually create a new database and/or ui from scratch.

I think one of the biggest caveats to UIS is the fact that uis relies on the Managers Database Object as the point of all references for components and what-not through the scene. This is in my opinion a little weird as it really restricts you from having more than one db, should you need/want more than one. Again, maybe it's just me seeing these weird things happen based on this, so not bashing or anything.

I would be curious to see, if you have a few mins, if you opened the integrations demo scene and saved it as a new scene and then did my steps
duplicate db, update character, game and ui references, what results you get.

Appreciate your time and support!
 
I know. It's too weird. Didn't do anything to any of the item defs before or after duplicating the db....
I think you miss read my first paragraph. I meant that you are supposed to manually fix the AmmoData Attributes from each weapon that uses that attribute. Attributes that reference ItemDefinitions do not get automatically converted, so you'll have to do it manually.

We used to rely even more on the Database for the for the UI, but then we added a dynamic way to get references to ItemCategory, ItemDefinitions, etc... using their name. We use it in most places we can. But not everywhere, in some cases its not possible, for example the Inventory or ItemBinding components.

Usually we do not expect users to dupplicate the demo database and use it as is, we usually expect users to create their own database from scratch to match their game. But perhaps for a future major update I could look into making the switch easier and adding some documentation for it.
 
Usually we do not expect users to dupplicate the demo database and use it as is, we usually expect users to create their own database from scratch to match their game. But perhaps for a future major update I could look into making the switch easier and adding some documentation for it.
I hear ya and partially agree. But if you think about it, people new to your asset will most likely use the existing database as it's already pre-set, if you will, that allows users to learn out to set up new def, etc.. based off existing ones... I get what your saying but I've always been a fan of using what the asset has available and knowingly works out-of-the-box and modify to my needs, eventually removing some pre set things no longer needed, etc...

I think you miss read my first paragraph. I meant that you are supposed to manually fix the AmmoData Attributes from each weapon that uses that attribute. Attributes that reference ItemDefinitions do not get automatically converted, so you'll have to do it manually.
Not even sure what needs to be fixed and where on this as nothing has changed outside of duplicating the database and some prefabs. I compared the original weapon prefabs with the duplicated ones and they only thing that needed to be changed were the reference to any itemdefs that had and respective prefabs within them as well as possibly conversion of the DB itemdefs within them---Which I did and then my weapon prefabs matched 100% the originals so that's what is blowing my mind. When I receive an error or two or even a warning, I go back into the prefab and none of the changes I updated too are even there anymore.. They were before play-mode as I clicked off an updated one and then something else and then back to it to ensure it saved the updates. So something is resetting them on play as if they were the original which they are not.

I don't know man. get furstrated that the most logical way of replicating what's within the asset does not work.
 
My guess is that your item prefabs are good, what is causing you issues is your ItemDefinitions Within the Inventory Manager.

Are your ItemDefinitions pointing to the correct prefab?
1628059525334.png
Click on the prefab to see where it is in the project view

And do the same for the AmmoData, Normally I should be getting it by name but ensure that it is correct.
1628059613652.png

I will look into solutions to make it easier to dupplicate an existing database.
 
Top