Shop Item Element UGUI

Scripting with the ShopItemElementUGUI class.

The ShopItemElementUGUI class is used to represent a shop item for the uGUI shop window.

Fields & Properties

Name
Description
Type
Access

button

The button component.

Button

public

itemIcon

The image that displays the item icon.

Image

public

itemBackground

The image that displays the item icon.

Image

public

costIcon

The image that displays the cost icon.

Image

public

dimensionsLabel

The label that displays the item dimensions.

TextMeshProUGUI

public

nameLabel

The label that displays the item name.

TextMeshProUGUI

public

itemTypeLabel

The label that displays the item type.

TextMeshProUGUI

public

costLabel

The label that display the cost.

TextMeshProUGUI

public

shopkeeper

The shopkeeper reference.

Shopkeeper

public

item

The item.

Item

public

Set Shop Item

The SetShopItem method sets the shopkeeper and the item that the object should represent.

myShopItemUGUI.SetShopItem(myShopkeeper, myItem);

Refresh

The Refresh method updates the UI elements.

myShopItemUGUI.Refresh();

Last updated