Player picks up an item but the item is not shown in the inventory slot

My debug shows that my character has successfully picked up an item. However, the inventory window shows nothing. If I move curser to the slot. I see an empty tooltip box there.

If I test it by inputing slots[0].item = InventoryItem.GetFromID(“86239215-d485-4cd4-a51d-e8c60cfc3cd8”) in Awake(); I could see “Hat, this is a hat” tooltip description but I don’t see the item UI. So I haven’t got any chance to test drag and drop.

What might be the problem that causes this type of error? What script or what prefab should I go check?

It sounds like the UI isn’t getting the InventoryUpdated event. Are you using the scripts from this section or the scripts in the Inventory.zip in the integration section.

I used the scripts in the inventory.zip. I realize that the scripts in inventory.zip are different from the section scripts, and they are also different from the scripts in the RPG git. If I have the existing files from the Combat course and I don’t want to overwrite any file. Can I import the section files and scripts to a new project and then drag the scripts or prefabs to my existing RPG project? cause i find the package manager can only import the files to my project following its fixed folder setup. I can’t import all of them to a designated folder.

The scripts in the section scripts aren’t fully fleshed out, but you can do exactly that. Create a project with the section package and copy them to your project. Just bear in mind that the state of the package scripts at the beginning of a section is incomplete, since we have you do challenges and modifications on them.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms