Options in the Ultimate Grid Inventory system are managed through Scriptable Objects (SO). This system relies on event triggers to execute actions. By creating an event associated with an option and then writing a script to handle that event, you can customize the behavior of your inventory options.
In this documentation page, we'll walk through setting up a Discard Option as an example.
To add functionality to your option, you need to create a MonoBehavior script that listens to the event. Attach this script to a GameObject in your Scene. Here’s an example MonoBehavior:
Finally, add the option to the desired item. In the Group Options Settings field of the Item, add your newly created option to the list:
Option added to an ItemLoading image
Hit play, open the Options Menu, and click on your option to see the action logged from your script:
Logging the Option ActionLoading image
With these steps, you’ve successfully created and configured an option for your inventory system. Continue to explore other features and customization options to enhance your grid inventory!