Equipment Slot Element UGUI

Scripting with the EquipmentSlotElementUGUI class.

The EquipmentSlotElementUGUI class is used as an equipment slot by the EquipmentWindowUGUI.

Fields & Properties

Name
Description
Type
Access

slot

The slot data.

EquipmentSlot

public

button

The button component.

Button

public

rectTransform

The rect transform.

RectTransform

public

slotIcon

The image that is used to display the slot icon.

Image

public

itemBackground

The image that is used to display the item background.

Image

public

itemIcon

The image that is used to display the item icon.

Image

public

dragElement

The element created when the item stack is being dragged.

EquipmentSlotElementUGUI

protected

IsVisible

If this equipment slot is visible.

bool

public

HasItem

If this equipment slot has an item.

bool

public

Set Data

Use the SetData method to set equipment slot data to the element. This method requires a Equipment Slot as a reference. This will also call Refresh.

myEquipmentSlotUGUI.SetData(myEquipmentSlot);

Refresh

Refresh updates the UI elements.

myEquipmentSlotUGUI.Refresh();

Last updated