Animation Slot Event Trigger

An Animation Slot Event Trigger lets an item action respond to a specific equipment slot, which is useful when two equipped items must reach their use, reload, equip, or unequip timing independently.

Choose shared or slot-specific timing

Animation Slot Event Trigger extends Animation Event Trigger with Wait For Slot Event. Choose the mode based on how the equipped items should behave:

Scenario Trigger settings Example event
One item acts at a time, or every waiting item should advance together. Enable Wait For Animation Event and leave Wait For Slot Event disabled. OnAnimatorItemUse
Items in different slots must advance independently. Enable both Wait For Animation Event and Wait For Slot Event. Use a slot-qualified event in each relevant clip. OnAnimatorItemUseSlot0 or OnAnimatorItemUseSlot1
The action needs only a fixed delay. Clear Wait For Slot Event while it is visible, then disable Wait For Animation Event and set Duration. No Animator event is required.

In Version 3, enabling Wait For Slot Event permits the slot-qualified event in addition to the shared base event. It does not reject the base event. If separate items must complete independently, do not leave an unsuffixed base event in a clip that can run while both triggers are waiting.

Disabling Wait For Animation Event hides Wait For Slot Event without clearing it. An enabled slot setting still accepts its slot-qualified event and can complete a duration wait early. For duration-only timing, temporarily enable Wait For Animation Event, clear Wait For Slot Event, then disable Wait For Animation Event again.

Configure a slot-specific item event

The Use Event on a Usable Action is a common example:

  1. Select the item’s GameObject and find its Character Item component. Note its Slot ID; the supplied humanoid setup normally uses slot 0 for the right hand and slot 1 for the left hand.
  2. Expand the item action’s Use Event.
  3. Enable Wait For Animation Event. The Wait For Slot Event option becomes visible; enable it for independent per-slot timing.

Use Event waiting for an animation event with the optional slot setting, while Use Complete Event uses a 0.05-second Duration

  1. Read the trigger field’s tooltip for its base event name. Use Event registers OnAnimatorItemUse, while Use Complete Event registers OnAnimatorItemUseComplete.
  2. Append Slot and the Character Item’s numeric Slot ID without spaces. For a Use Event in slot 0, the result is OnAnimatorItemUseSlot0.
  3. Open Window > Animation > Animation and select the clip that performs this item’s action.
  4. Add an Animation Event at the intended action frame. Set Function to ExecuteEvent and String to the exact slot-qualified name.
  5. Repeat the setup for each slot that acts independently. For slot 1, use OnAnimatorItemUseSlot1 rather than copying the slot 0 string.
  6. If first-person and third-person states use different clips, add the corresponding event to every clip that can be active in its perspective.

The event name is registered by the item or item-action code; it is not generated from the visible field label at runtime. The tooltip is the reliable source for the base name.

Common event names

Ultimate Character Controller commonly follows a base-name-plus-slot convention:

Trigger Shared base event Slot 0 event
Use Event OnAnimatorItemUse OnAnimatorItemUseSlot0
Use Complete Event OnAnimatorItemUseComplete OnAnimatorItemUseCompleteSlot0
Reload Event OnAnimatorItemReload OnAnimatorItemReloadSlot0
Reload Complete Event OnAnimatorItemReloadComplete OnAnimatorItemReloadCompleteSlot0
Equip Event OnAnimatorItemEquip OnAnimatorItemEquipSlot0
Unequip Event OnAnimatorItemUnequip OnAnimatorItemUnequipSlot0

Use the field tooltip rather than assuming that every custom trigger follows this naming convention.

Verify in Play Mode

  1. On the character’s Animator Monitor, expand Editor and enable Log Events.
  2. Enter Play Mode with items assigned to the slots being tested.
  3. Perform the slot 0 action. The Console should show the slot-qualified event, such as Execute OnAnimatorItemUseSlot0, and only the intended slot should advance.
  4. Perform the equivalent slot 1 action. The Console should show the Slot1 event and the other item should remain unaffected.
  5. Repeat the test in every supported perspective and with both items ready at the same time.
  6. If the trigger uses Duration instead, verify the delayed result without expecting an Animator Monitor event log.

Disable Log Events after the timing has been confirmed.

Troubleshooting

Symptom Check Fix
Both equipped items respond to one animation event. The active clip may still send the shared base event, such as OnAnimatorItemUse. Use slot-qualified events, enable Wait For Slot Event on each trigger, and remove the shared event from clips that must act independently.
A slot-specific event is logged but the item does not advance. Wait For Slot Event may be disabled, or the suffix may not match the Character Item’s Slot ID. Enable the option and make the event end in the exact Slot<ID> value used by that Character Item.
Wait For Slot Event is not visible, or a duration wait finishes early on a slot event. Wait For Animation Event hides the slot option when disabled but retains its value. Enable Wait For Animation Event, clear Wait For Slot Event, then disable Wait For Animation Event for duration-only timing.
Slot 0 works but slot 1 does not. The second clip may still contain Slot0, or both Character Items may use the same Slot ID. Correct the event String and confirm each Character Item > Slot ID.
The action remains waiting in one perspective. That perspective may use a different animation clip without the slot-qualified event. Add the correct event to every first-person or third-person clip that can drive the action.
A duration-based trigger produces no event log. Animator Monitor logs Animator events, not Scheduler callbacks. Verify the visible action after Duration instead; no Execute ... log is expected.
  • Animation Event Trigger explains the shared event and Duration modes inherited by this trigger.
  • Item Slots explains Slot IDs and matching first-person and third-person slot layouts.
  • Usable Item Actions explains the Use and Use Complete stages.
  • Dual Wielding covers an item setup where independent slot timing is especially useful.

Developer reference

AnimationSlotEventTrigger.RegisterUnregisterEvent receives the base event name and Slot ID from its owner. Version 3 registers both the base name and a cached slot name formed as eventName + "Slot" + slotID. InvokeSlotEvent checks Wait For Slot Event independently of Wait For Animation Event, so a retained slot setting can complete a scheduled duration wait. The inherited base-event handler remains available whenever Wait For Animation Event is enabled.

The current Usable Action registers its Use Event as follows:

m_UseEvent.RegisterUnregisterEvent(
    register,
    m_Character,
    "OnAnimatorItemUse",
    m_CharacterItem.SlotID,
    HandleItemUseAnimationSlotEvent);

Start or reset the pending event-or-duration wait with:

m_UseEvent.WaitForEvent(true);

The callback overload can also receive the registered Slot ID. After one valid event or scheduled callback completes the wait, later events do not invoke the completion callback again until another wait begins.