Inventory Item Definitions
Overview
An Inventory Item Definition is a catalog item providing static data for your item instances.
It is the only item you can instantiate.
Editor Overview
Open the Inventory window by going to Window → Game Foundation → Inventory. The Inventory window will let you configure inventory item definitions.
The interface is similar to the other catalog items editor.
(1) In addition to the shared General section, you have the Initial allocation
field to determine how many items instances of this definition your player will have at the start of the game.
(2) In the Mutable Properties section you can define a list of fields for the item instances to read and write at runtime.\ A mutable property must define:
- A value type. Supported types are
integer number
(e.g. int & long),real number
(e.g. float & double),bool
,string
andresources asset
(e.g. any asset stored in a Resources folder). - A unique key for you to access the property at runtime.
A default value.
Mutable Properties belong only to the definition they are declared into. This means you can use the same property key in different definitions with a different type if you want to.