Skip to main content

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.

"Figure 1"

Basics#

"Figure 2"

Field NameDescription
Display NameName to show for this theme.
DescriptionDescription of this theme.
Spawn TagWhenever 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 TriggersIf checked the Theme will react to Collider and Collider2D triggers.
Enable RaycastIf checked the Theme will use Raycasting to find objects it can interact with.
Raycast SourceSets the location to start raycast from (Character or Main Camera).
Raycast CullingLayermask used when performing raycast.
Max DistanceMaximum distance of raycast.
Raycast OffsetOffset to apply to the Raycast Source when performing raycast.
Click to SelectTells child objects if they should respond to click events.
Min CountWhen 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 & Rarity#

"Figure 3"

Inventory 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 NameDescription
Item TextText to display in the Prompt UI when the detected object is an Item.
Merchant TextText to display in the Prompt UI when the detected object is a Merchant.
Container TextText to display in the Prompt UI when the detected object is a Container.
Crafting TextText to display in the Prompt UI when the detected object is a Crafting Area.

Inventory Menu#

"Figure 4"

The Inventory Menu is the main UI your user will interact with when managing their inventory.

Field NameDescription
List TypeScroll 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 ListItems 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 SpawnIf checked this element will display in a Canvas other then the one normally used by the theme.
Override TagSets the Tag Name associated with the Canvas to use for displaying this element.
Open ModeTells 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.
ButtonName of the button to listen to for opening the menu.
Run KeyKey to listen to for opening the menu.
Close ModeTells 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.
ButtonName of the button to listen to for closing the menu.
Run KeyKey to listen to for closing the menu.
Enable Drag & DropAllow the user to drag & drop items.
Use Item ManagerThe 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 ButtonsProvide the user with UI buttons to perform context sensitive actions on an item.
Item DetailsShow detailed information about a selected item in a separate section of the UI.
Item PreviewShow a rendered preview of the selected object.
Character PreviewShow a rendered preview of the Character. This allows the user to see changes to the character as items are equipped or unequipped.

Item Manager#

"Figure 5"

This step is only shown if Use Item Manager was selected in the previous step.

Field NameDescription
Close ModeTells 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.
ButtonName of the button to listen to for closing the menu.
Run KeyKey to listen to for closing the menu.
Repair CostsItems can be damaged/repaired. By selecting this option the cost associated with repairing an item will be displayed on this element.

Item Container Menu#

"Figure 6"

Items in Inventory Cog are capable of acting as containers that hold other items. This UI is dedicated to interacting with those items.

Container UI#

At a minimum this element must display the contents of a container.

Field NameDescription
List TypeScroll 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 ListItems 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 ListItems 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 & DropAllow the user to drag & drop items.
Show Context ButtonsProvide the user with UI buttons to perform context sensitive actions on an item.
Item DetailsShow detailed information about a selected item in a separate section of the UI.
Item PreviewShow a rendered preview of the selected object.
Character PreviewShow a rendered preview of the Character. This allows the user to see changes to the character as items are equipped or unequipped.

Player UI#

Additionally 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 NameDescription
Show Player InventoryShow the main inventory next to the container's inventory.
List TypeScroll 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 ListItems 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 & DropAllow the user to drag & drop items.
Show Context ButtonsProvide the user with UI buttons to perform context sensitive actions on an item.

Crafting#

"Figure 7"

Inventory Cog support combinging multiple objects into a new object "crafting".

Field NameDescription
Crafting TypeNormal 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 QueueInventory 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 ButtonsProvide the user with UI buttons to perform context sensitive actions.
Show Recipe DetailsShow the deatils of a selected recipe in a separate section of the UI.

Merchant Menu#

"Figure 8"

Inventory Cog allows users to buy and sell items via Merchants.

Merchant UI#

At a minimum this element must display the contents of a merchant's stock.

Field NameDescription
List TypeScroll 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 ListItems 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 & DropAllow the user to drag & drop items.
Item DetailsShow detailed information about a selected item in a separate section of the UI.
Item PreviewShow a rendered preview of the selected object.
Trade DetailObsolete.

Player UI#

Additionally 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 NameDescription
Show Player InventoryShow the main inventory next to the container's inventory.
List TypeScroll 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 ListItems 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 & DropAllow the user to drag & drop items.

Item Container Menu#

"Figure 9"

Items in the world can also be used as containers outside of the user's inventory. This element controls interaction with those world objects.

Container UI#

At a minimum this element must display the contents of a container.

Field NameDescription
List TypeScroll 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 ListItems 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 & DropAllow the user to drag & drop items.
Show Context ButtonsProvide the user with UI buttons to perform context sensitive actions on an item.
Item DetailsShow detailed information about a selected item in a separate section of the UI.
Item PreviewShow a rendered preview of the selected object.
Character PreviewShow a rendered preview of the Character. This allows the user to see changes to the character as items are equipped or unequipped.

Player UI#

Additionally 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 NameDescription
Show Player InventoryShow the main inventory next to the container's inventory.
List TypeScroll 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 ListItems 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 & DropAllow the user to drag & drop items.
Show Context ButtonsProvide the user with UI buttons to perform context sensitive actions on an item.

Finalizing#

"Figure 9"

Once 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.