To build the UI using the Ultimate Grid Inventory (UGI) asset, we'll create a new scene dedicated to the inventory UI. This separation helps maintain a clear distinction between inventory UI and gameplay functionalities. Here's a preview: these scenes will communicate with each other using Scriptable Objects!
With the Canvas configured, we can now initialize the Inventory Manager. This prefab contains essential scripts that manage various inventory functions, including the Draggable System, Input System, and Highlight System.
To set up the Inventory Manager:
Navigate to the menu: Ultimate Grid Inventory > Initialize Inventory
This will open the initializer tool
Initializer Menu InventoryLoading image
Click the Initialize or Update button
If successful, you'll see this confirmation log (or a warning if properties are being updated):
Initializer log successLoading image
This process creates an Inventory Manager in the scene hierarchy and attaches the CanvasInitializer script to the Canvas we created.
Your scene should now look like this:
Scene final resultLoading image
With the Inventory Manager and Canvas properly set up, you can proceed to the next page to complete the setup. If you encounter any issues, refer to the Troubleshooting section below.
This error occurs because the Initializer process attempts to attach the CanvasInitializer script to a Canvas, but no Canvas was found in the scene. Make sure to create and configure the Canvas first, following the steps in the "Setting up the Inventory Canvas" section above.