Inventory Engine Advice

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Dmangames
Posts: 20
Joined: Fri Jul 13, 2018 9:55 pm

Inventory Engine Advice

Post by Dmangames »

Hi,

I'm trying to integrate inventory engine and I've run into a few issues.

1. Persistent Inventory throws this error

Code: Select all

TargetException: Object does not match target type.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:236)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
PixelCrushers.DialogueSystem.InventoryEngineSupport.PersistentInventory.OnRecordPersistentData () (at Assets/Pixel Crushers/Dialogue System/Third Party Support/Inventory Engine Support/Scripts/PersistentInventory.cs:27)
UnityEngine.GameObject:SendMessage(String, SendMessageOptions)
PixelCrushers.DialogueSystem.Tools:SendMessageToEveryone(String) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Utility/Tools.cs:217)
PixelCrushers.DialogueSystem.PersistentDataManager:SendPersistentDataMessage(String) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Save Subsystem/PersistentDataManager.cs:178)
PixelCrushers.DialogueSystem.PersistentDataManager:Record() (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Save Subsystem/PersistentDataManager.cs:156)
PixelCrushers.DialogueSystem.PersistentDataManager:GetSaveData() (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Save Subsystem/PersistentDataManager.cs:251)
PixelCrushers.DialogueSystem.DialogueSystemSaver:RecordData() (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Save Subsystem/DialogueSystemSaver.cs:18)
PixelCrushers.SaveSystem:RecordSavedGameData() (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:368)
PixelCrushers.SaveSystem:SaveToSlot(Int32) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:320)
PixelCrushers.DialogueSystem.MenuSystem.SaveHelper:SaveGameNow(Int32) (at Assets/Dialogue System Extras/Dialogue System Menu Framework/Scripts/SaveHelper.cs:173)
PixelCrushers.DialogueSystem.MenuSystem.SaveHelper:SaveGame(Int32) (at Assets/Dialogue System Extras/Dialogue System Menu Framework/Scripts/SaveHelper.cs:168)
PixelCrushers.DialogueSystem.MenuSystem.SaveHelper:QuickSave() (at Assets/Dialogue System Extras/Dialogue System Menu Framework/Scripts/SaveHelper.cs:204)
PixelCrushers.DialogueSystem.MenuSystem.<ReturnToAppsWhenDoneSaving>c__Iterator1:MoveNext() (at Assets/Dialogue System Extras/Textline/Scripts/MenuUtility.cs:46)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
PixelCrushers.DialogueSystem.MenuSystem.MenuUtility:SaveAndReturnToAppMenu() (at Assets/Dialogue System Extras/Textline/Scripts/MenuUtility.cs:30)
UnityEngine.EventSystems.EventSystem:Update()
Under Saved Data Variable Name I have MainInventory and I created a variable in the Dialogue System called MainInventory which is a files type.

2. Also I am having difficulty getting my test item to show up in the Inventory Display. I can't seem to get the UI to update and I frequently run into an Arguement out of range exception if I try to add the Test Item then remove it.

I know this isn't necessarily under the Dialogue System's jurisdiction but any help is greatly appreciated.
Attachments
My TestItem
My TestItem
Capture.PNG (28.85 KiB) Viewed 394 times
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Inventory Engine Advice

Post by Tony Li »

Hi,
Dmangames wrote: Tue Jul 31, 2018 1:04 pm1. Persistent Inventory throws this error
Inventory Engine's API changed recently, requiring an update to the support package. This updated support package will be in 2.0.3, which is releasing very soon: InventoryEngine_Support_2018-07-31.unitypackage
Dmangames wrote: Tue Jul 31, 2018 1:04 pm2. Also I am having difficulty getting my test item to show up in the Inventory Display.
Here are some things to check:
  • Make sure the item asset is in a Resources folder, inside a subfolder named "Items".
  • Assign the Prefab Drop > Prefab.
  • Make sure Target Inventory Name exactly matches your player's inventory name.
  • Check the Console window / output log for any warnings to errors.
Post Reply