Method CreateItem
CreateItem(string)
This will create a new InventoryItem based on
the InventoryItemDefinition matching the given key.
Declaration
public static InventoryItem CreateItem(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The Identifier of the InventoryItemDefinition to assign to this Item. |
Returns
| Type | Description |
|---|---|
| InventoryItem | The newly created item based on specified InventoryItemDefinition. |
CreateItem(InventoryItemDefinition)
This will create a new InventoryItem based on the given InventoryItemDefinition.
Declaration
public static InventoryItem CreateItem(InventoryItemDefinition itemDefinition)
Parameters
| Type | Name | Description |
|---|---|---|
| InventoryItemDefinition | itemDefinition | The InventoryItemDefinition to assign to this Item. |
Returns
| Type | Description |
|---|---|
| InventoryItem | The newly created item based on specified InventoryItemDefinition. |