Inventory Pro Add-On Documentation
  • Welcome to Inventory Pro Add-On for FPS Engine!
  • BEFORE WE START
    • Early Considerations
    • Add-On Compatibility
    • List of Tutorials
  • GETTING STARTED
    • 01. Basic Set-Up
    • 02. Roadmap
  • CONTENT
    • 03. Content
      • 03.1 CRAFTING
        • Recipe_SO
          • Ingredient
        • CraftingButton
        • CraftingProcess
        • CraftingUI
        • CraftingBench
        • IngredientUIIcon
      • 03.2 FAV MENU
        • FavItemSlot
        • FavItemsMenu
          • FavItemReference
      • 03.3 INTERACTABLES
        • InventoryItemPickeable
      • 03.4 INVENTORY
        • InventoryGridData_SO
        • InventoryProManager
        • GridGenerator
        • InventorySlot
        • SlotData
        • InventoryProManagerInputActions
      • 03.5 ITEMS
        • AppleItem_SO
        • EnergyDrinkItem_SO
      • 03.6 OTHERS
        • 03.6.1 TRADE HUB
          • TradeButton
          • TradeUI
          • TradeHub
        • Chest
        • ExamineItem
      • 03.7 SHOP
        • PurchasableItem
        • Shop
          • ShopItemData
        • ShopUI
        • ShopButton
      • 03.8 UI TOOLKIT
        • ContextMenu
        • HighlightInteractions
        • Padding
        • TooltipManager
    • 04. Shared Content for Add-Ons
  • HOW TO USE & GUIDES
    • Uninstalling the Add-On: Fixing Errors
    • Creating, Updating & Deleting Recipes
    • Inventory Designer: Creating, Updating & Deleting Inventory Grid Data
    • Working with Crafting Benches
    • Working with Chests
    • Working with Shops
    • Working with Purchasable Items
    • Working with Item Examination
    • Favorite Pinned Items Menu Considerations
    • Inventory, Hotbar & Chests Considerations
    • Tetris Inventory Considerations
    • Weapons & Ammo from the Inventory
    • Custom Item_SOs
    • Adding a New Inventory
  • FAQ
    • FAQ
  • SUPPORT
    • Support
Powered by GitBook
On this page
  • CRAFTING UI
  • Functions | CraftingUI.cs
  1. CONTENT
  2. 03. Content
  3. 03.1 CRAFTING

CraftingUI

PreviousCraftingProcessNextCraftingBench

Last updated 1 month ago

CraftingUI inherits from

CraftingUI displays all available items to craft. Crafting UI is enabled on interacting with the Crafting Bench, and it´s disabled when leaving the Crafting Bench.

CRAFTING UI

  • craftButton: Button that contains a Recipe to craft. Refer to for more information.

  • ingredientPrefab: IngredientUIIcon that defines an ingredient for the Recipe of the highlighted CraftButton

  • ingredientContainer: Ingredients Prefabs will be instantiated inside ingredientContainer

The rest of properties are part of .

Functions | CraftingUI.cs

UpdateSelectedUI(Recipe_SO, int amountToCraft)

Highlights the current recipe and displays information about it: Name, result, ingredients, etc...

  • recipe: Recipe_SO to display all information about.

  • amountToCraft: Amount to display on the UI. This needs to match the real amount to craft to and UI are up-to-date.

UpdateIngredientDisplay(Recipe_SO, int amountToCraft)

Updates the Ingredient Displays of a highlighted Recipe based on the desired amount of items to craft.

  • recipe: Recipe_SO to display all information about.

  • amountToCraft: Amount to display on the UI. This needs to match the real amount to craft to and UI are up-to-date.

UpdateCraftingProcess(CraftingProcess craftingProcess, float progress)

Updates a Recipe Button progress.

  • craftingProcess: Crafting Process to update.

  • progress: Takes values from 0 to 1.

GetCraftButton(Recipe_SO recipe)

  • recipe: Among all buttons, it returns the button that contains this recipe.

GetCraftingProcess(Recipe_SO recipe)

  • recipe: Among all Crafting Processes, it returns the one that contains this recipe.

CraftItem(Recipe_SO recipe, int craftAmount)

Starts the Crafting Process for a Recipe based on the amount to craft.

  • recipe: recipe to craft.

  • craftAmount: Amount to craft.

IsCrafting(Recipe_SO recipe)

Returns true if the passed recipe is being crafted. Returns a boolean.

  • recipe: recipe to check crafting process.

Returns the Craft Button based on its recipe. Returns a .

Returns the Crafting Process based on its recipe. Returns a .

TradeUI
CraftButton
TradeUI
Crafting Processes
Crafting Processes
CraftButton
Crafting Process