Part 1: Creating a Theme
Themes tell Inventory Cog how to display information to the user. There are several demo Themes built-in to show you how you can arrange your UI, but for this Quick Start we'll be creating a new theme from scratch. To begin select Tools > NullSave > Inventory Theme Wizard
from the menu.
#
BasicsField Name | Description |
---|---|
Display Name | Name to show for this theme. |
Description | Description of this theme. |
Spawn Tag | Whenever this theme is activated Inventory Cog needs to find a Canvas to use for display. It does this by looking for a Canvas that is tagged with the same value supplied here and will be unable to function correctly if none exists. |
Enable Triggers | If checked the Theme will react to Collider and Collider2D triggers. |
Enable Raycast | If checked the Theme will use Raycasting to find objects it can interact with. |
Raycast Source | Sets the location to start raycast from (Character or Main Camera). |
Raycast Culling | Layermask used when performing raycast. |
Max Distance | Maximum distance of raycast. |
Raycast Offset | Offset to apply to the Raycast Source when performing raycast. |
Click to Select | Tells child objects if they should respond to click events. |
Min Count | When working with a stack of items you can offer the user a Count Selection window allowing them to drop, consume, etc multiple items in a stack at once. The stack must be at least as large as the value supplied here to display the Count Selection window. |
#
Prompts & RarityInventory Cog will display a prompt to the user whenever they are able to interact with an object. These prompts can be customized but by default have text related to the type of object they are able to interact with. Items can also have a Rarity associated with them on a scale of 0 to 10. The name and color associated with Rarities are defined here.
Field Name | Description |
---|---|
Item Text | Text to display in the Prompt UI when the detected object is an Item. |
Merchant Text | Text to display in the Prompt UI when the detected object is a Merchant. |
Container Text | Text to display in the Prompt UI when the detected object is a Container. |
Crafting Text | Text to display in the Prompt UI when the detected object is a Crafting Area. |
#
Inventory MenuThe Inventory Menu is the main UI your user will interact with when managing their inventory.
Field Name | Description |
---|---|
List Type | Scroll Grid diplays the items in a grid that can be scrolled through vertically. Paged Grid displays a set of items in a grid that can be paged through. Scroll List displays the items in a vertical list. |
Include Category List | Items are grouped into Categories by displaying this list the user can filter the displayed items to just the category they desire or All Categories. |
Override Spawn | If checked this element will display in a Canvas other then the one normally used by the theme. |
Override Tag | Sets the Tag Name associated with the Canvas to use for displaying this element. |
Open Mode | Tells the system how to open the menu. Manual requires you to open the menu manually. Often used when you open the menu via a UI element. By Button monitors Input.GetButtonDown. By Key monitors Input.GetKeyDown. |
Button | Name of the button to listen to for opening the menu. |
Run Key | Key to listen to for opening the menu. |
Close Mode | Tells the system how to close the menu. Manual requires you to open the menu manually. Often used when you open the menu via a UI element. By Button monitors Input.GetButtonDown. By Key monitors Input.GetKeyDown. |
Button | Name of the button to listen to for closing the menu. |
Run Key | Key to listen to for closing the menu. |
Enable Drag & Drop | Allow the user to drag & drop items. |
Use Item Manager | The Item Manager is a separate window that may be used for interacting with an item to do things such as drop, equip, repair, etc. The same actions can be done from the Inventory Menu. This options is often used for mobile games. |
Show Context Buttons | Provide the user with UI buttons to perform context sensitive actions on an item. |
Item Details | Show detailed information about a selected item in a separate section of the UI. |
Item Preview | Show a rendered preview of the selected object. |
Character Preview | Show a rendered preview of the Character. This allows the user to see changes to the character as items are equipped or unequipped. |
#
Item ManagerThis step is only shown if Use Item Manager was selected in the previous step.
Field Name | Description |
---|---|
Close Mode | Tells the system how to close the menu. Manual requires you to open the menu manually. Often used when you open the menu via a UI element. By Button monitors Input.GetButtonDown. By Key monitors Input.GetKeyDown. |
Button | Name of the button to listen to for closing the menu. |
Run Key | Key to listen to for closing the menu. |
Repair Costs | Items can be damaged/repaired. By selecting this option the cost associated with repairing an item will be displayed on this element. |
#
Item Container MenuItems in Inventory Cog are capable of acting as containers that hold other items. This UI is dedicated to interacting with those items.
#
Container UIAt a minimum this element must display the contents of a container.
Field Name | Description |
---|---|
List Type | Scroll Grid diplays the items in a grid that can be scrolled through vertically. Paged Grid displays a set of items in a grid that can be paged through. Scroll List displays the items in a vertical list. |
Include Category List | Items are grouped into Categories by displaying this list the user can filter the displayed items to just the category they desire or All Categories. |
Include Category List | Items are grouped into Categories by displaying this list the user can filter the displayed items to just the category they desire or All Categories. |
Enable Drag & Drop | Allow the user to drag & drop items. |
Show Context Buttons | Provide the user with UI buttons to perform context sensitive actions on an item. |
Item Details | Show detailed information about a selected item in a separate section of the UI. |
Item Preview | Show a rendered preview of the selected object. |
Character Preview | Show a rendered preview of the Character. This allows the user to see changes to the character as items are equipped or unequipped. |
#
Player UIAdditionally this component can show the user's inventory as well. This way the user can drag items from their main inventory into a container or vise versa.
Field Name | Description |
---|---|
Show Player Inventory | Show the main inventory next to the container's inventory. |
List Type | Scroll Grid diplays the items in a grid that can be scrolled through vertically. Paged Grid displays a set of items in a grid that can be paged through. Scroll List displays the items in a vertical list. |
Include Category List | Items are grouped into Categories by displaying this list the user can filter the displayed items to just the category they desire or All Categories. |
Enable Drag & Drop | Allow the user to drag & drop items. |
Show Context Buttons | Provide the user with UI buttons to perform context sensitive actions on an item. |
#
CraftingInventory Cog support combinging multiple objects into a new object "crafting".
Field Name | Description |
---|---|
Crafting Type | Normal mode only allows players to craft items that they have a recipe and the proper ingredients for. Blind mode allows users to attempt to craft items without knowing a recipe or blindly. Some examples are cooking food in Breath of the Wild or making items in classic Minecraft. |
Destroy If No Match | (Blind Only) Destroys the ingredients used when attempting to craft blindly and no successful outcome is found. |
Always Use Single | (Blind Only) When placing items for crafting blindly always place each item in its own slot even in multiple of the same item are used. |
Show Crafting Queue | Inventory Cog allows items to be crafted either immediately or over time. The Crafting Queue shows items that are in the process of being crafted. |
Show Context Buttons | Provide the user with UI buttons to perform context sensitive actions. |
Show Recipe Details | Show the deatils of a selected recipe in a separate section of the UI. |
#
Merchant MenuInventory Cog allows users to buy and sell items via Merchants.
#
Merchant UIAt a minimum this element must display the contents of a merchant's stock.
Field Name | Description |
---|---|
List Type | Scroll Grid diplays the items in a grid that can be scrolled through vertically. Paged Grid displays a set of items in a grid that can be paged through. Scroll List displays the items in a vertical list. |
Include Category List | Items are grouped into Categories by displaying this list the user can filter the displayed items to just the category they desire or All Categories. |
Enable Drag & Drop | Allow the user to drag & drop items. |
Item Details | Show detailed information about a selected item in a separate section of the UI. |
Item Preview | Show a rendered preview of the selected object. |
Trade Detail | Obsolete. |
#
Player UIAdditionally this component can show the user's inventory as well. This allows the user to sell as well as buy in the same screen.
Field Name | Description |
---|---|
Show Player Inventory | Show the main inventory next to the container's inventory. |
List Type | Scroll Grid diplays the items in a grid that can be scrolled through vertically. Paged Grid displays a set of items in a grid that can be paged through. Scroll List displays the items in a vertical list. |
Include Category List | Items are grouped into Categories by displaying this list the user can filter the displayed items to just the category they desire or All Categories. |
Enable Drag & Drop | Allow the user to drag & drop items. |
#
Item Container MenuItems in the world can also be used as containers outside of the user's inventory. This element controls interaction with those world objects.
#
Container UIAt a minimum this element must display the contents of a container.
Field Name | Description |
---|---|
List Type | Scroll Grid diplays the items in a grid that can be scrolled through vertically. Paged Grid displays a set of items in a grid that can be paged through. Scroll List displays the items in a vertical list. |
Include Category List | Items are grouped into Categories by displaying this list the user can filter the displayed items to just the category they desire or All Categories. |
Enable Drag & Drop | Allow the user to drag & drop items. |
Show Context Buttons | Provide the user with UI buttons to perform context sensitive actions on an item. |
Item Details | Show detailed information about a selected item in a separate section of the UI. |
Item Preview | Show a rendered preview of the selected object. |
Character Preview | Show a rendered preview of the Character. This allows the user to see changes to the character as items are equipped or unequipped. |
#
Player UIAdditionally this component can show the user's inventory as well. This way the user can drag items from their main inventory into a container or vise versa.
Field Name | Description |
---|---|
Show Player Inventory | Show the main inventory next to the container's inventory. |
List Type | Scroll Grid diplays the items in a grid that can be scrolled through vertically. Paged Grid displays a set of items in a grid that can be paged through. Scroll List displays the items in a vertical list. |
Include Category List | Items are grouped into Categories by displaying this list the user can filter the displayed items to just the category they desire or All Categories. |
Enable Drag & Drop | Allow the user to drag & drop items. |
Show Context Buttons | Provide the user with UI buttons to perform context sensitive actions on an item. |
#
FinalizingOnce you are happy with your theme press the Finalize button to create you theme and all the associated prefabs, this may take several moments. Layout errors may display in the console at the end of generation, these can be ignored.