Override inventory clicks

The behaviour of inventory menus can be altered by hooking into the OnMenuElementClick event, which is run whenever the user clicks inside a menu.

This script demonstrates how to build custom inventory behaviour through script. It shows how the standard behaviour of left-clicking to select/combine, right-click to examine, can be moved to a custom script.

To use it:


 * 1) Set your InventoryBox element's "Inventory box type" property to "Custom Script"
 * 2) Paste the code below into a C# file named OverrideInventory.cs
 * 3) Attach the new Override Inventory component to a GameObject in the scene

OverrideInventory.cs: