Crafting Window UGUI
Scripting with the CraftingWindowUGUI class.
The CraftingWindowUGUI
class is the Inventool's crafting window.
Fields & Properties
itemSlotPrefab
The item slot prefab.
ItemSlotElementUGUI
protected
plusSignPrefab
The plus sign prefab.
GameObject
protected
craftingTitleLabel
The crafting title label.
TextMeshProUGUI
protected
craftingSlotElements
A list of all crafting slots.
List<ItemSlotElementUGUI>
protected
plusSignElements
A list of all plus sign elements.
List<GameObject>
protected
craftScroll
The scroll rect that contains a list of items to craft.
ScrollRect
protected
contentLayout
The scroll rect content layout group.
HorizontalLayoutGroup
protected
currencyElement
The result cost currency element.
CurrencyElementUGUI
protected
craftButton
The button that confirms the craft.
Button
protected
craftButtonLabel
The label that displys the craft button text.
TextMeshProUGUI
protected
craftResultSlot
The craft result item slot.
ItemSlotElementUGUI
protected
craftEmptyLabel
The label that is displayed when the craft list is empty.
TextMeshProUGUI
protected
closeButton
The close button.
Button
protected
crafter
Crafting logic handler.
Crafter
protected
activeCraftsman
The craftsman currently being interacted with.
Craftsman
protected
useCraftingCost
If the crafting cost should be used. This is set to true if the window is opened for crafting only.
bool
protected
OpenedForMerchant
If the window is currently open for a merchant.
bool
public
Active Instance
You can get the active CraftingWindowUGUI
instance with CraftingWindowUGUI.Instance
. Ensure there's an instance of it in your scene before using this field.
Open
Call the Open
method when the crafting window should be opened. This method accepts a Craftsman
parameter. Use null to open without a craftsman reference.
Close
Close
simply closes the window.
Last updated