Inventool Action Menu UGUI
🧭 InventoolActionMenuUGUI Class
A pop‑up menu for custom actions.
Namespace:
Esper.Inventool.UI.UGUIAccess:publicType:classInherits:CrossInputSupportedWindowUGUI
📦 Fields
protected
optionPrefab
ActionMenuOptionUGUI
The action menu option prefab.
protected
optionContainer
RectTransform
RectTransform that will contain all options.
protected
closeButton
Button
Full‑screen invisible close button.
protected
canvasGroup
CanvasGroup
Canvas group component.
protected
loadedOptions
List<ActionMenuOptionUGUI>
List of loaded action menu options.
public static
Instance
InventoolActionMenuUGUI
The active instance.
🧰 Methods
protected override
Awake()
void
Initializes singleton, sets up UI, wires close button, and closes initially.
protected virtual
CreateMenuOption(ActionMenuOption actionMenuOption)
ActionMenuOptionUGUI
Instantiates and configures a menu option UI element.
public virtual
Open(RectTransform target, params ActionMenuOption[] options)
void
Opens the action menu at target; orders, creates, and displays options.
public virtual
Open(RectTransform target, List<ActionMenuOption> options)
void
Overload that accepts a list; delegates to params overload.
public virtual
Close()
void
Closes the action menu and invokes onClosed.
protected
ForceInsideView(RectTransform target)
IEnumerator
Positions content near target or mouse and clamps inside viewport.
Active Instance
You can get the active InventoolActionMenuUGUI instance with InventoolActionMenuUGUI.Instance. Ensure there's an instance of it in your scene before using this field.
Opening
Opening the action menu requires a RectTransform target and a list of Action Menu Options.
Closing
Customizations
The options displayed on the action menu are customizable through scripting.
Customize For Inventory Item Stacks
To customize the action menu options displayed when an item stack in the inventory is clicked, edit the ItemStack.actionMenuOptionsGetter field.
If you'd like a reference, you can find the original in the ItemStack.actionMenuOptionsGetter field in the ItemStack.cs script.
Customize For Equipment Slots
To customize the action menu options displayed when an equipment slot in the inventory is clicked, edit the EquipmentSlot.actionMenuOptionsGetter field.
If you'd like a reference, you can find the original in the EquipmentSlot.actionMenuOptionsGetter field in the EquipmentSlot.cs script.
Last updated