Give definitions in one Item Category different skills by storing an Item Action Set reference on each definition. Iron Sword and Fire Wand can share Equip/Drop through Weapon while their Use command chooses a strike or spell.

Choose where behavior runs

Need Route
Common inventory commands Category Item Action Set.
Definition-specific effect from Item data/actor ItemActionSet attribute plus Use Item Action Set Attribute.
Equipped model, muzzle or animation context Item Object Behaviours triggered through Usable Equipped Items Handler.
Mana, health or another character system Custom action/behavior that validates and calls that gameplay system.

Keep one system responsible for the effect, even when several inputs expose it.

Configure definition-specific actions

  1. In Main Manager > Item Categories > Weapon > Attributes > Item Definition, declare ItemActionSet of type ItemActionSet and optional float Cooldown.
  2. Create Item Action Set assets for Iron Sword and Fire Wand through Create > Ultimate Inventory System > Item Actions. Set their Item Category to Weapon and add the relevant custom action.
  3. In Item Definitions, assign each weapon its own action-set reference and reuse time. Use Item attributes instead only for mutable copies that genuinely choose different behavior.

An ItemActionSet attribute overriding its inherited value with the Throwable Item Action asset.

The legacy attribute image names its asset Throwable Item Action; assign the sword/wand skill assets in the same override field.

  1. Create a Weapon entry set containing Use Item Action Set Attribute:
Setting Choice and meaning
Attribute Name ItemActionSet; match exact spelling.
Action Index One valid index in each referenced set; default 0.
Use One On to pass Amount one; this alone does not consume an Item.
Remove On Use Off for reusable equipment; enable consumption only with coordinated effect/removal preflight.
Cooldown Attribute Name Cooldown, when using the float attribute.
Cooldown Item User Data Name ItemCooldown; match the view module.

An Item Action Set for Usable Item with Use Item Action Set Attribute targeting ItemActionSet at index 0, Use One enabled, and Remove On Use disabled.

The legacy action crop ends after Remove On Use; scroll to configure cooldown fields.

  1. Add this entry set beside Equip/Drop in the UI’s Category Item Action Set. Assign it to Item View Slots Container Category Item Action Set Binding and keep Auto Set Item User on for the bound actor.
  2. Use a panel or one explicit action index. Direct index -1 invokes all matching commands, so keep destructive/mutually exclusive choices out of that flow.

The wrapper selects one nested action by index. Keep its assigned asset/category and eligibility consistent with the selected Item; use the category retrieval path for exception-filtered command lists.

Input, costs and cooldowns

Inventory/hotbar bindings supply selected ItemInfo and Item User. Item Hotbar Handler maps inputs to slots and their configured actions.

For equipped behavior, assign a Usable Item Prefab containing Item Object and Item Object Behaviour Handler, then add Usable Equipped Items Handler beside Equipper/Item User. Map Inputs to Item Object Index and Action Index. A custom behavior sets its next-use time after execution; CanUse compares it with Time.time.

Provide a valid Item User for cooldowns. The wrapper stores next-use times per Item ID in that user’s runtime data. Equivalent immutable common Items sharing an ID share the user’s timer; mutable unique weapons have separate entries. On Cooldown Item View, match Item User Inventory ID, Cooldown Attribute Name and Cooldown Item User Data Name.

Coordinate nested eligibility, effect, consumption and cooldown in one custom action/wrapper when the effect can refuse. For mana/Currency/ingredients, validate the resource in CanInvokeInternal and own the deduction/rollback order. Keep per-character/per-use state on the actor or Item rather than shared action assets.

Verify and save

Select each weapon and confirm common Equip/Drop plus Use. Use each: only its own effect should run, reusable equipment remains owned, cooldown blocks immediate reuse and its overlay matches. Test hotbar context and equipped behavior separately to prevent double invocation.

Definition/action-set references are project configuration. Item User’s runtime dictionary and scene effects need project saving if they must persist. Loading with the same user keeps its current timers; a new user starts empty. Verify both lifetimes deliberately.

Troubleshooting

Symptom Check and fix
Both weapons run one skill Assign different definition references while keeping the common Weapon declaration.
Missing Use or no effect Assign the entry/category binding, exact attribute name, nonempty asset and valid nested index; validate its eligibility.
Cooldown/overlay fails Supply Item User and match its Inventory ID/data names.
Equipment disappears or costs are inconsistent Keep removal off for reusable Items; coordinate costs/effect/removal in the custom transaction.
Equipped input does nothing Match prefab, Equipper slot, behavior order and both input indexes.

Developer reference

Invoke a definition-selected action

Initialize the referenced set, validate the index and check eligibility:

public bool TryInvokeAssignedSkill(
    ItemInfo itemInfo,
    ItemUser itemUser,
    int actionIndex = 0)
{
    if (itemInfo.Item == null || itemInfo.Amount <= 0) { return false; }

    if (!itemInfo.Item.TryGetAttributeValue<ItemActionSet>(
            "ItemActionSet", out var actionSet) || actionSet == null) {
        return false;
    }

    var actions = actionSet.ItemActionCollection;
    if (actions == null) { return false; }

    actions.Initialize(false);

    if (actionIndex < 0 || actionIndex >= actions.Count) { return false; }

    var action = actions[actionIndex];
    if (action == null) { return false; }

    if (!action.CanInvoke(itemInfo, itemUser)) { return false; }

    action.InvokeAction(itemInfo, itemUser);
    return true;
}

The helper reports that eligibility passed and invocation was attempted; use gameplay results for effect success. InvokeAction performs another check and returns void.

Retrieve category actions

Use exception-filtered retrieval for the same list as UI:

var buffer = new ItemAction[5];
var actions = categoryItemActionSet.GetItemActionsForItem(
    itemInfo.Item, ref buffer);

for (int i = 0; i < actions.Count; i++) {
    Debug.Log(actions[i].Name);
}

Invoke a returned action with its required actor/panel context. Keep action names unique for name-based commands.

Cooldown notification

The wrapper sends action, Item Info and duration on the Item User GameObject:

private void OnEnable()
{
    EventHandler.RegisterEvent<ItemAction, ItemInfo, float>(
        itemUser.gameObject,
        EventNames.c_CharacterGameObject_UsedItemActionWithCooldown_ItemAction_ItemInfo_Float,
        OnSkillCooldownStarted);
}

private void OnDisable()
{
    EventHandler.UnregisterEvent<ItemAction, ItemInfo, float>(
        itemUser.gameObject,
        EventNames.c_CharacterGameObject_UsedItemActionWithCooldown_ItemAction_ItemInfo_Float,
        OnSkillCooldownStarted);
}

private void OnSkillCooldownStarted(
    ItemAction action,
    ItemInfo itemInfo,
    float cooldown)
{
    Debug.Log($"{itemInfo.Item.name} cooldown: {cooldown}");
}

Pair exact targets/signatures when unregistering. Binding invocation/cancellation/panel-failure UnityEvents and collection removal notifications are separate.

Related: Item, Item Info, Attributes, Item Actions, Hotbar, Item Views, Usable Item Objects, Input, Save System.