Class InventoryItemDefinitionAsset
Asset version of a definition for inventory items.
Inheritance
Inherited Members
Namespace: UnityEngine.GameFoundation.DefaultCatalog
Syntax
public sealed class InventoryItemDefinitionAsset : TradableDefinitionAsset, ISerializationCallbackReceiver
Properties
initialAllocation
Determines how many of this InventoryItemDefinition to automatically add to player's inventory.
Declaration
public ExternalizableValue<int> initialAllocation { get; }
Property Value
Type | Description |
---|---|
ExternalizableValue<Int32> |
initialQuantityPerStack
If this InventoryItemDefinition is stackable, how many items (quantity) should be initialized in each initial stack?
Declaration
public ExternalizableValue<long> initialQuantityPerStack { get; }
Property Value
Type | Description |
---|---|
ExternalizableValue<Int64> |
isStackableFlag
Is this InventoryItemDefinition stackable?
Declaration
public bool isStackableFlag { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
ConfigureItem(CatalogBuilder, IExternalValueProvider)
Configures a specified builder
with the specifics
of this item.
Declaration
protected override CatalogItemConfig ConfigureItem(CatalogBuilder builder, IExternalValueProvider valueProvider)
Parameters
Type | Name | Description |
---|---|---|
CatalogBuilder | builder | The target builder. |
IExternalValueProvider | valueProvider | A value provider to override some catalog item's data with an external source. |
Returns
Type | Description |
---|---|
CatalogItemConfig | The item config. |
Overrides
GetDefaultProperties()
Get all default properties stored in this definition.
Declaration
public List<PropertyData> GetDefaultProperties()
Returns
Type | Description |
---|---|
List<PropertyData> | Return a list of PropertyData for each mutableProperties stored in this definition. The returned list is never null. |
OnAfterItemDeserialize()
Called at the end of OnAfterDeserialize. Enable inheritance to add specific deserialization process.
Declaration
protected override void OnAfterItemDeserialize()
Overrides
OnBeforeItemSerialize()
Called at the end of OnBeforeSerialize. Enable inheritance to add specific serialization process.
Declaration
protected override void OnBeforeItemSerialize()