Item Slot Element

Scripting with the ItemSlotElement class.

The ItemSlotElement class is a VisualElement that represents an item.

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

acceptedEnchantmentMode

The enchantment mode of an item that the slot will accept.

ItemType.Enchantmentmode

public

iconElement

The visual element that displays the item icon.

VisualElement

public

amountLabel

The label that displays the stack amount of the item.

Label

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.

VisualElement

protected

ItemStack

The item stack reference.

ItemStack

public

useItemRestrictions

If item restrictions should be enabled.

useItemRestrictions

public

showAmount

If the item amount text should be displayed.

showAmount

public

HasItem

If this equipment slot has an item.

HasItem

public

Last updated