Enchanting Window

Scripting with the EnchantingWindow class.

The EnchantingWindow class is the Inventool's enchanting window. This is split from the other systems unlike the Inventool Window.

Fields & Properties

Name
Description
Type
Access

enchantingTitle

The enchanting title element.

Label

protected

enchantingContent

The enchanting content.

VisualElement

protected

enchantmentSlotElements

A list of all enchantment slots.

List<ItemSlotElement>

protected

enchantmentSlotLeft

Left enchantment slot.

ItemSlotElement

protected

enchantmentSlotRight

Right enchantment slot.

ItemSlotElement

protected

enchantmentCostIcon

Enchanting cost icon element.

VisualElement

protected

enchantmentCostLabel

Enchanting cost label.

Label

protected

enchantButton

The button that confirms the enchant.

Button

protected

closeButton

The close button.

Button

protected

activeEnchanter

The enchanter currently being interacted with.

Enchanter

protected

useEnchantingCost

If the enchanting cost should be used. This is set to true if the window is opened for enchanting only.

bool

public

OpenedForMerchant

If the window is currently open for a merchant.

bool

public

Active Instance

You can get the active EnchantingWindow instance with EnchantingWindow.Instance. Ensure there's an instance of it in your scene before using this field.

Open

Call the Open method when the enchanting window should be opened. This method accepts a Enchanter parameter. Use null to open without a enchanter reference.

EnchantingWindow.Instance.Open(myEnchanter);

Close

Close simply closes the window.

EnchantingWindow.Instance.Close();

Last updated