Quick Start
#
Step 1 - Interface ManagerYou'll need an Interface Manager in order to pickup items or interact with vendors and containers. Right-click in your Hierarchy
and select GDTK > Interface Manager
to create one. Now select the new object and select what button and/or key you'd like to use to perform interactions.
#
Step 2 - Inventory DatabaseThe Inventory Database holds all the top-level inventory information such as Items, Equip Slots, Currencies, etc. To create one right-click in your Hierarchy
and select GDTK > Inventory > Inventory Database
for a new blank database or GDTK > Inventory > Inventory Database (Sample Data)
for a database pre-populated with sample data.
#
Step 3 - Inventory ThemeIn order to display information to your players you'll need an Inventory Theme UI. You can create a pre-populated one by selecting your Canvas
, right-clicking, and selecting UI > GDTK: Inventory > Default Theme
. This theme can be customized to fit your needs and turned into a prefab.
The Default Theme tells all UI components to look for an Inventory that is registered with the key Player
as well a Merchant that is registered with the key PlayerMerchant
.
#
Step 4 - InventorySelect your player character, click the Add Component
button, and select Inventory.
Expand the Behavior section, select the Register option and type Player
in the Register Key field.
Drag your Default Theme
into the Theme UI field.
Expand the Equip Slots section and press the Generate from Database
button.
#
Step 5 - Player MerchantIn order for the Merchant tab on the Default Theme
to work, you'll need to add a Merchant to the player.
Select your player character, create a new Empty Game Object, and name it Player Merchant
.
Select the new object, click the Add Component
button, and select Merchant.
Select the Register option and type PlayerMerchant
in the Register Key field.
#
Step 6 - InteractorIn order to interact with objects the character will need an Interactor or Interactor 2D. Right-click your player and select either GDTK > Interactor
or GDTK > Interactor 2D
.
#
ConclusionYou're now ready to begin using GDTK: Inventory.
You can press the i
key to open and close your Inventory window where you can manage inventory, craft, and buy/sell.
If you're using the Inventory Database (Sample Data)
you can drag and drop prefabs from Assets\NullSave\GDTK Pro Tools\Resources\Inventory\SampleItems\Pickup Objects
into your scene to pick them up.
Have a look at the Tutorials
section for in-depth details on creating items, recipes, and more.