Shield item is equipped but it is not added into the inventory

I have the same setup that the inventory with UCC integration demo. When I pickup the shield, it is equipped but it is not added into the inventory. The sword is correctly equipped and added when it also pickup with the shield.

The drop action is not working too then when I drop only the sword falls on the floor and the shield is inactivated but still in the left hand.

I have no error in the console.

I performed a step by step to analyse the code in inventory Item Pickup but I see nothing special.

What I should check to identify the issue and have it working like in the demo?

UCC 2.2.7
UIS 1.1.1
Unity 2019.4.16f1
 
Last edited:
Please download the latest UIS v1.1.3 and the latest integration package from the website.

And let me know if you are still experiencing the same issues.
 
I have imported UIS v1.1.3. As I have also Dialog System and Quest machine, I have downloaded also the last version in integration section of web page.

But when importing Dialog system integration, I have got this error:
Assets\Pixel Crushers\Common\Third Party Support\Opsive UIS Support\Scripts\SaveSystemManagerNoDisk.cs(49,13): error CS7036: There is no argument given that corresponds to the required formal parameter 'savePriority' of 'SaveSystemManager.OrderSaversByPriority(bool)'

I use the latest version of Dialog System for Unity this is version 2.2.14 and that was already imported in my project at the beginning of this month. I have tried to reimported first this last version and also the last version of UIS integration to see if this fix the issue but the message is always there.

I have no issue when importing Quest machine then I suppose that is correct.

so, in this script SaveSystemManagerNoDisk the call OrderSaversByPriority is performed without parameter but one is required according to SaveSystemManager.
This is an overriden function then as there is no base used I don't know if it should be completely different.

In SaveSystemManagerNoDisk I put false instead of nothing but the fix might be different:
/// <summary>
/// Assume that m_SaveData has been set by the UISSaver using SetCurrentSaveData.
/// Just apply the current m_SaveData.
/// </summary>
protected override void LoadInternal(int saveIndex)
{
if (m_SaveData == null)
{
Debug.LogError($"Cannot load save at index {saveIndex}.");
return;
}

OrderSaversByPriority(false);
for (int i = 0; i < m_Savers.Count; i++)
{
m_Savers.Load();
}
}

And in virtual function of SaveSystemManager:
/// <summary>
/// Load the saved data from the save index provided.
/// </summary>
/// <param name="saveIndex">The save index.</param>
protected virtual void LoadInternal(int saveIndex)
{
if (m_Saves == null || !m_Saves.ContainsKey(saveIndex)) {
Debug.LogError($"Cannot load save at index {saveIndex}.");
return;
}

m_SaveData = new SaveData(m_Saves[saveIndex]);

OrderSaversByPriority(false);
for (int i = 0; i < m_Savers.Count; i++) {
m_Savers.Load();
}
}

The integration with Dialog System requires a little update.

After putting False, of course the issue disappeared. It is not a priority to me as I am not on Saving system for the moment.

I have followed again the video tutorial about UI Desinger and more or less redo my inventory that is poorly customised (a confirmation button before quitting the game need to create nother MainMenu for that... and a raw texture to display my character) but the upgrade is working fine.

Whatever the issue that I met in version 1.1.1 is still present in 1.1.3. So the issue is elsewhere!


By the way, I found a weird setup in demo. The swordPickup has an object called Sword but when you open it it is a shield! There is a mismatch somewhere that makes it work!

Another thing, in the sword prefab, the component Item has no Item Definition assigned. It seems that this is the case in several others items when others have a Item Definition assigned. It is confusing...
 
Last edited:
Digging a little bit more, I see that the shield item is not present in the Equippable item collection in Inventory of character whereas the sword is present but it is present in equipped item collection that it is coherent because the shield is equipped.

After a moment, I have disabled the Item Binding component presents in Sword prefab and that has fixed the issue with the shield!

The shield works as wanted like the sword. It is possible to pickup, to drop and have them in the inventory.


I have not fully retrieved my inventory as it was in version 1.1.1 because I have tried to do fully from scratch from UI Designer. The last version is very interesting. Be able to duplicate all prefabs and scriptableobjects is very beneficial for productivity and it really reduces the pain when learning to use the tool.

I have some issues with the mouse cursor that is currently not blocking locomotions when inventory is opened and the panel Equipment is never displayed.... But hopefully, I will find quickly what I missed during the setup with UI Designer.
 
I have created a panel for Grid and a panel for Equipment both belongs to Main Menu\Center Panel\Main Content. I want them both opened in same time. For the moment, they are alternatively opened when pressing the menu buttons Inventory or Equipment.

To avoid that I have deleted the component Display panel and I move the equipment panel in Grid panel. I have also added a second component Item View Slots Container Panel Binding in the Grid panel and assigned the Equipment panel on the Item View Slots container. In this way it works like in the demo but I am not sure that it is the normal way to go.

Whatever the issue exposed in the title is fixed.
 
Last edited:
I'm sorry about the Integration bug with the Dialogue System.
I made a change and forgot that it would impact the integration. Tony Li has updated the integration during the weekend. You can download the latest on the website.

For the panels, I think your solutions should work well. In the demos we have the equipment and grid share the same Display Panel
 
Top