Item Slot Element UGUI

Scripting with the ItemSlotElementUGUI class.

The ItemSlotElementUGUI class is an any-purpose item slot. This is used by the enchanting and crafting uGUI windows.

Fields & Properties

Name
Description
Type
Access

acceptedItemType

The item type that the slot will accept. If left null, any type will be accepted.

ItemType

public

canAccept

A filter that will allow/disallow items to be placed in the slot.

Func<ItemStack, bool>

public

rectTransform

The RectTransform.

RectTransform

public

button

The button component.

Button

public

slotIcon

The image that displays the slot icon.

Image

public

itemIcon

The image that displays the item icon.

Image

public

itemBackground

The image that displays the item icon.

Image

public

amountLabel

The label that displays the stack amount of the item.

TextMeshProUGUI

public

onItemUpdated

A callback for when an item is placed into or removed from this slot.

UnityEvent

public

actionMenuOptions

A list of action menu options.

List<ActionMenuOption>

public

dragElement

The element created when the item stack is being dragged.

ItemSlotElementUGUI

protected

itemStack

The item stack reference.

ItemStack

public

useItemRestrictions

If item restrictions should be enabled.

bool

public

showAmount

If the item amount text should be displayed.

bool

public

HasItem

If this item slot has an item.

bool

public

Refresh

Refresh updates the UI elements.

myItemSlotUGUI.Refresh();

Last updated