Nice to see everybody today!
So, I put the Inventory, Inventory Engine Lua and Dialogue System Inventory Event Listener scripts on the Dialogue Manager
and created a BaseItem asset. mmAddItem() successfully added the item to Dialogue manager's Inventory, but It does
not appear in the Inventory display itself.
Any ideas on what's wrong?
Thank you for your patience.
[Solved!]Trouble updating MM Inventory Engine display through Dialogue System
-
- Posts: 111
- Joined: Thu Sep 27, 2018 11:06 pm
[Solved!]Trouble updating MM Inventory Engine display through Dialogue System
Last edited by CodePrincess on Wed Nov 13, 2019 3:24 pm, edited 1 time in total.
Thank you so much for your help.
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Re: Trouble updating MM Inventory Engine display through Dialogue System
Hi!
Are there any errors or warnings in the Console window?
After mmAddItem(), if you inspect the inventory, does the Inspector show the item? For example, in the screenshot below the inventory shows a Teddy Bear:
If you add the item to the Inventory at design time and then play the scene, does it appear in the UI? The screenshot below shows the Teddy Bear added at design time:
If it doesn't show up in the UI, check your item asset's configuration.
You can also try setting up an item picker (for example, look at the prefab RetroCoinPicker), pick up the item without using the Dialogue System, and see if it shows in the UI.
Are there any errors or warnings in the Console window?
After mmAddItem(), if you inspect the inventory, does the Inspector show the item? For example, in the screenshot below the inventory shows a Teddy Bear:
If you add the item to the Inventory at design time and then play the scene, does it appear in the UI? The screenshot below shows the Teddy Bear added at design time:
If it doesn't show up in the UI, check your item asset's configuration.
You can also try setting up an item picker (for example, look at the prefab RetroCoinPicker), pick up the item without using the Dialogue System, and see if it shows in the UI.
- Attachments
-
- mmAddItem2.png (35.27 KiB) Viewed 334 times
-
- Posts: 111
- Joined: Thu Sep 27, 2018 11:06 pm
Re: Trouble updating MM Inventory Engine display through Dialogue System
Making ItemPicker objects for all the items did the trick; they can even be deactivated! Also, interestingly, you need the Adventurer Game Object for the Inventory to work, too. Maybe because of the SetComponentEnabledOnDialogueEvent script?
Anyway, I can now update the inventory though Dialogue Menu! Onward to my trickiest situation yet!
Thank you again, for making this dream possible!
Anyway, I can now update the inventory though Dialogue Menu! Onward to my trickiest situation yet!
Thank you again, for making this dream possible!
Thank you so much for your help.
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Re: [Solved!]Trouble updating MM Inventory Engine display through Dialogue System
Glad to help!
The Adventurer GameObject shouldn't be necessary. The Set Component Enabled On Dialogue Event isn't really necessary either; it just disables the Adventurer's InventoryDemoCharacter component during conversations. What wasn't working without the Adventurer?
The Adventurer GameObject shouldn't be necessary. The Set Component Enabled On Dialogue Event isn't really necessary either; it just disables the Adventurer's InventoryDemoCharacter component during conversations. What wasn't working without the Adventurer?