Method CreateItem
CreateItem(string)
This will create a new InventoryItem based on the InventoryItemDefinition matching the given id.
Declaration
public static InventoryItem CreateItem(string definitionId)
Parameters
Type | Name | Description |
---|---|---|
string | definitionId | The Id 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. |