Class InventoryItem
UI list item for purchased inventory items.
Inherited Members
Namespace: NotificationSamples.Demo
Syntax
public class InventoryItem : MonoBehaviour
Fields
icon
Declaration
[SerializeField]
protected Image icon
Field Value
Type | Description |
---|---|
UnityEngine.UI.Image |
quantityLabel
Declaration
[SerializeField]
[Tooltip("Label to store the quantity bought.")]
protected TextMeshProUGUI quantityLabel
Field Value
Type | Description |
---|---|
TMPro.TextMeshProUGUI |
Properties
ItemData
The item data linked to this UI item.
Declaration
public InventoryItemData ItemData { get; }
Property Value
Type | Description |
---|---|
InventoryItemData |
Methods
Initialise(InventoryItemData)
Initialise the item with the specified settings.
Declaration
public void Initialise(InventoryItemData itemData)
Parameters
Type | Name | Description |
---|---|---|
InventoryItemData | itemData |
OnReceivedItem()
Called when another item of the same type was received after buying.
Declaration
public void OnReceivedItem()