Hey, I have a system where you click a hotspot and it automatically adds an item to your inventory.
I'd also like to have a global button that can remove the last item you added.
I thought I could work it somehow with the new Inventory : Check Selected - Include last selected, but not exactly sure how.
Would it make sense to have the option "remove Add or Remove : Remove last selected" ?
Comments
Provided that items are added in order, it can still be done through code by removing the last item in the List:
AC.InvItem lastItem = AC.KickStarter.runtimeInventory.localItems [KickStarter.runtimeInventory.localItems.Count-1];
AC.KickStarter.runtimeInventory.Remove (lastItem);
You can place such code in a function within a new C# script, attach it to a GameObject in your scene (or make a prefab), and use the Object: Call event Action to invoke it at runtime.