Inventool Documentation
  • Inventool Documentation
  • đŸ•šī¸Quick Start
    • Installation
    • Start Creating
  • 💡General
    • Running the Demo
    • Menu Options
    • UI Updates
    • UI Customizations
      • uGUI
      • UI Toolkit
    • Custom Item Drops
  • 🎓Tutorials
    • Demo Walkthrough
  • âœī¸Editors
    • Inventool
      • Inventory
      • Equipment
      • Items
      • Currencies
      • Crafting
      • Dismantling
      • Enchanting
      • Stats
        • Stat IDs
        • Attributes
      • Settings
    • Item Type Manager
    • Localization Editor
    • Stats Editor
    • Merchants
      • Shopkeeper
      • Craftsman
      • Enchanter
    • Storage
    • Loot
      • Loot Box
      • Item Pouch
      • Currency Pouch
    • Components
      • Initializer
      • UI
        • uGUI
          • Inventool Window
          • Split UI
            • Inventory Window UGUI
            • Equipment Window UGUI
            • Key Items Window UGUI
            • Crafting Window UGUI
            • Enchanting Window UGUI
            • Storage Window UGUI
            • Shop Window UGUI
            • Selector UGUI
          • Action Menu UGUI
          • Hover Details UGUI
          • Confirm Prompt UGUI
          • Quantity Prompt UGUI
          • Character Viewer Element UGUI
        • UI Toolkit
          • Inventool Window
          • Split UI
            • Inventory Window
            • Equipment Window
            • Key Items Window
            • Crafting Window
            • Enchanting Window
            • Storage Window
            • Shop Window
          • Action Menu
          • Hover Details
          • Confirm Prompt
          • Quantity Prompt
        • Character Viewer
      • Overworld Merchant
      • Storage Keeper
      • Item Drop
      • Item Spawner
      • Input
        • Cross Input Support
        • Cross Input Support UGUI
          • Target Selectable
  • 📄Scripting API
    • Initialization
    • Inventory
    • Equipment
      • Equipment Slot
    • Items
      • Item
      • Item Type
      • Item Stack
      • Item Drop
      • Item Spawner
      • Loot Box
      • Item Pouch
    • Currencies
      • Currency Identity
      • Currency
        • Value
      • Currency Pouch
    • Crafting
      • Craft
      • Crafter
    • Enchanting
      • Enchantment
    • Stats
      • Stat Identity
      • Attribute
      • Stat
        • Stat Value
          • Value
        • Effectiveness
      • Stat Profile
    • Storing
      • Storage
      • Storage Keeper
    • Settings
    • Merchants
      • Shopkeeper
      • Craftsman
      • Enchanter
      • Overworld Merchant
    • UI
      • uGUI
        • Inventool Window UGUI
        • Split UI
          • Draggable Window UGUI
            • Inventory Window UGUI
            • Equipment Window UGUI
            • Key Items Window UGUI
            • Crafting Window UGUI
            • Enchanting Window UGUI
            • Storage Window UGUI
            • Shop Window UGUI
          • Selector UGUI
        • Action Menu UGUI
        • Hover Details UGUI
        • Confirm Prompt UGUI
        • Quantity Prompt UGUI
        • Draggable Element UGUI
          • Equipment Slot Element UGUI
          • Item Slot Element UGUI
          • Item Stack Element UGUI
        • Action Menu Option UGUI
        • Currency Element UGUI
        • Inventory Filter UGUI
        • Inventory Slot UGUI
        • Key Item Element UGUI
        • Shop Item Element UGUI
        • Storage Currency Element UGUI
        • Stat Element UGUI
      • UI Toolkit
        • Inventool Window
        • Split UI
          • Draggable Window
            • Inventory Window
            • Equipment Window
            • Key Items Window
            • Crafting Window
            • Enchanting Window
            • Storage Window
            • Shop Window
        • Action Menu
        • Hover Details
        • Confirm Prompt
        • Quantity Prompt
        • Item Elements
          • Item Stack Element
          • Equipment Slot Element
          • Item Slot Element
          • Shop Item Element
      • Action Menu Option
      • Character Viewer
    • Events
    • Sounds
    • Saving & Loading
      • Inventory & Equipment
      • Storage
    • Input
      • Cross Input Support
      • Cross Input Support UGUI
    • Localization
      • Localization Settings
      • Localizer
  • đŸ› ī¸Support
    • Getting Help
  • 📚Changelogs
    • Latest Releases
    • Future Plans
  • ⭐Rate Me?
Powered by GitBook
On this page
  • Fields & Properties
  • Active Instance
  • Opening & Closing
  • Open
  • Opening for Storage
  • Close
  • Toggle
  • Character View
  • Setting Custom Image
  • Reset Character View Rotation
  • Tabs
  • Close Active Tab
  • Activate Tab
  • Select Tab Button
  • Move Inventory
  1. Scripting API
  2. UI
  3. uGUI

Inventool Window UGUI

Scripting with the InventoolWindowUGUI class.

The InventoolWindowUGUI is the full-screen UI option for the uGUI.

Fields & Properties

Name
Description
Type
Access

openedTab

The type of the currently opened tab.

InventoolWindowUGUI.Tab

public

tabButtonContainer

The transform that contains all tab buttons.

RectTransform

protected

selectedTabButton

The currently selected tab button.

Button

protected

inventoryTabButton

The inventory tab button.

Button

protected

craftingTabButton

The crafting tab button.

Button

protected

enchantingTabButton

The enchanting tab button.

Button

protected

keyItemsTabButton

The key items tab button.

Button

protected

inventoryTab

The inventory tab.

RectTransform

protected

craftingTab

The crafting tab.

RectTransform

protected

enchantingTab

The enchanting tab.

RectTransform

protected

keyItemsTab

The key items tab.

RectTransform

protected

shopTab

The shop tab.

RectTransform

protected

storageTab

The storage tab.

RectTransform

protected

activeTab

The currently active tab.

RectTransform

protected

closeButton

The close button.

Button

protected

currenciesContainer

The RectTransform that contains currency UI elements.

RectTransform

protected

titleUnderline

The underline of the title.

RectTransform

protected

itemStackElementPrefab

The item stack element prefab. This is the object placed over slots.

ItemStackElementUGUI

protected

inventorySlotPrefab

The empty inventory slot prefab.

InventorySlotUGUI

protected

inventoryFilterPrefab

The inventory filter prefab.

InventoryFilterUGUI

protected

currencyElementPrefab

The currency display element prefab.

CurrencyElementUGUI

protected

inventoryContent

The inventory content.

RectTransform

protected

pageLeftButton

The inventory's previous page button.

Button

protected

pageRightButton

The inventory's next page button.

Button

protected

inventoryTitleLabel

The inventory title element.

TextMeshProUGUI

protected

weightLabel

The inventory weight amount label.

TextMeshProUGUI

protected

pagesLabel

The inventory pages label.

TextMeshProUGUI

protected

filterTitleLabel

The inventory filter title label.

TextMeshProUGUI

protected

weightArea

The inventory weight area.

GameObject

protected

inventoryArea

The inventory area.

RectTransform

protected

gridLayoutGroup

The grid layout group for the inventory slots.

GridLayoutGroup

protected

inventoryContentFitter

The inventory content size fitter.

ContentSizeFitter

protected

filterScroll

The inventory filter scroll.

ScrollRect

protected

inventoryScroll

The inventory scroll rect.

ScrollRect

protected

inventoryCanvasGroup

The inventory canvas group for hiding purposes during reload.

CanvasGroup

protected

pagesArea

The area for the pagination text and buttons.

RectTransform

protected

inventoryScrollbar

The inventory scrollbar.

Scrollbar

protected

currencyElements

Loaded currency elements.

List<CurrencyElementUGUI>

protected

inventoryFilters

A list of inventory filters.

List<InventoryElementUGUI>

protected

selectedInventoryFilter

The currently selected filter.

InventoryFilterUGUI

protected

loadedInventorySlots

A list of all loaded inventory slots.

List<InventorySlotUGUI>

loadedItemElements

A list of all loaded item UI elements.

Dictionary<ItemStack, ItemStackElementUGUI>

protected

inventoryRequiresReload

If the inventory requires reloading.

bool

protected

originalInventoryAreaHeight

The original height of the inventory area.

float

protected

storageCurrencyElementPrefab

The currency display element prefab.

StorageCurrencyElementUGUI

protected

activeStorage

The storage reference.

Storage

protected

storageCurrenciesContainer

Contains currency visual elements.

RectTransform

protected

storageTitleLabel

The storage title label.

TextMeshProUGUI

protected

storageArea

The storage filter title label.

RectTransform

protected

storageFilterTitleLabel

The storage filter title label.

TextMeshProUGUI

protected

storageFilterScroll

The storage filter scroll.

ScrollRect

protected

storageScroll

The storage scroll view.

ScrollRect

protected

storageGridLayoutGroup

The grid layout group for the storage slots.

GridLayoutGroup

protected

storageContentFitter

The storage content size fitter.

ContentSizeFitter

protected

storagePagesArea

The area for the pagination text and buttons.

RectTransform

protected

storagePagesLabel

The pages label.

TextMeshProUGUI

protected

storagePageLeftButton

The previous page button.

Button

protected

storagePageRightButton

The next page button.

Button

protected

storageCanvasGroup

The storage canvas group for hiding purposes during reload.

CanvasGroup

protected

storageScrollbar

The storage scrollbar.

Scrollbar

protected

storageCurrencyElements

Loaded currency elements.

List<StorageCurrencyElementUGUI>

protected

filters

A list of storage filters.

List<InventoryFilterUGUI>

protected

selectedStorageFilter

The currently selected filter.

InventoryFilterUGUI

protected

loadedStorageSlots

A list of all loaded storage slots.

List<InventorySlotUGUI>

protected

storageLoadedItemElements

A list of all loaded item UI elements.

Dictionary<ItemStack, ItemStackElementUGUI>

protected

storageRequiresReload

If the storage requires reloading.

bool

protected

originalStorageAreaHeight

The original height of the storage area.

float

protected

slotContainer

The object that contains all equipment slots.

GameObject

protected

rotationResetButton

The button that resets the character viewer rotation.

Button

protected

rows

A list of all rows.

GameObject[]

protected

equipmentSlotElements

A list of all equipment slot elements.

List<EquipmentSlotelementUGUI>

protected

characterViewerElement

The character viewer element.

CharacterViewerElementUGUI

protected

characterViewer

The active character viewer.

CharacterViewer

protected

keyItemPrefab

The key item prefab.

KeyItemElementUGUI

protected

keyItemScroll

The scroll rect containing all key items.

ScrollRect

protected

descriptionScroll

The description scroll rect.

ScrollRect

protected

selectedKeyItemContent

The object that contains all content elements of the selected key item.

GameObject

protected

keyItemImage

The image used to display the selected key item's icon.

Image

protected

keyItemNameLabel

The label used to display the selected key item's name.

TextMeshProUGUI

protected

keyItemSubtypeLabel

The label used to display the selected key item's subtype.

TextMeshProUGUI

protected

keyItemDescriptionLabel

The label used to display the selected key item's description.

TextMeshProUGUI

protected

keyItemsEmptyLabel

The label that is displayed when the key items list is empty.

TextMeshProUGUI

protected

loadedKeyItems

A list of loaded key item elements.

List<KeyItemElementUGUI>

protected

selectedKeyItem

The currently selected key item.

KeyItemElementUGUI

protected

originalDescriptionScrollHeight

The original height of the description scroll.

float

protected

shopItemElementPrefab

The shop item element prefab.

ShopItemElementUGUI

protected

shopTitleLabel

The shop title.

TextMeshProUGUI

protected

shopFilterScroll

The shop scroll rect.

ScrollRect

protected

shopScroll

The shop scroll rect.

ScrollRect

protected

activeShopkeeper

The shopkeeper currently being interacted with.

Shopkeeper

protected

loadedShopItems

A list of shop items.

List<ShopItemElementUGUI>

protected

shopFilters

A list of shop filters.

List<InventoryFilterUGUI>

protected

selectedShopFilter

The currently selected shop filter.

InventoryFilterUGUI

protected

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

craftCurrencyElement

The result cost currency element.

CurrencyElementUGUI

protected

craftButton

The button that confirms the craft.

Button

protected

craftResultSlot

The craft result item slot.

ItemSlotElementUGUI

protected

craftEmptyLabel

The label that is displayed when the craft list is empty.

TextMeshProUGUI

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

enchantingTitleLabel

The enchanting title label.

TextMeshProUGUI

protected

enchantmentSlotElements

A list of all enchantment slots.

List<ItemSlotElementUGUI>

protected

enchantmentSlotLeft

Left enchantment slot.

ItemSlotElementUGUI

protected

enchantmentSlotRight

Right enchantment slot.

ItemSlotElementUGUI

protected

enchantCurrencyElement

The enchanting cost element.

CurrencyElementUGUI

protected

enchantButton

The button that confirms the enchant.

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

protected

OpenedForMerchant

If the window is currently open for a merchant.

bool

public

firstOpen

If this is the first time the window is opening.

bool

protected

Loaded

If all UI elements have been loaded.

bool

public

Active Instance

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

Opening & Closing

Open

The InventoolWindow can be opened in multiple ways, each for a different purpose.

Opening For Player

Call the Open method when the player wants to open their inventory.

InventoolWindowUGUI.Instance.Open();

Opening For Merchant

InventoolWindowUGUI.Instance.Open(myMerchant);

Opening for Storage

InventoolWindowUGUI.Instance.Open(myStorage);

Close

Close closes the window if opened for the player. Use Exit to close the window when opened for a merchant. Optionally, you can use ForceClose to close the window whether it's opened for a merchant or not.

InventoolWindowUGUI.Instance.Close();

Toggle

Optionally, you can use Toggle to open or close the window.

InventoolWindowUGUI.Instance.Toggle();

Character View

Setting Custom Image

If you don't have a Character Viewer set up in your scene, a default image will be displayed in the equipment section. You can override this image with a custom one. A Sprite or Texture2D will be required.

InventoolWindowUGUI.Instance.SetCharacterViewer(mySprite);

Reset Character View Rotation

If you have the Character Viewer set up, you can call ResetCharacterViewRotation to reset its view.

InventoolWindowUGUI.Instance.ResetCharacterViewRotation();

Tabs

The methods below can only be used in a script that inherits from InventoolWindowUGUI.

Close Active Tab

CloseActiveTab closes the tab currently enabled. This is useful if you added your own tabs.

CloseActiveTab();

Activate Tab

Use ActivateTab and provide a RectTransform that acts as the root of the tab. This will enable the tab.

ActivateTab(myTab);

Select Tab Button

To mark a tab button as selected, use SelectTabButton and provide the Button as a parameter.

SelectTabButton(myButton);

Move Inventory

You can move the inventory to a tab with the MoveInventory method. Provide a RectTransform (root of the tab) as a parameter.

MoveInventory(myTab);
PreviousuGUINextSplit UI

Last updated 8 days ago

You can open the window for the specific merchant by providing the reference as a parameter.

You can open the window for a specific storage by providing the reference as a parameter.

📄
merchant
storage