Item Effects change or present the owning Character Item Action: audio, spawned visuals, object/light changes, and local callbacks. Use Impact Actions when the result needs hit-target or collision data.

Configure the group and invocation

Add Generic Item Effects in a module that initializes its Effect Group, add rows, assign both perspective values/identifiers, and select the containing module’s lifecycle stage. Put item changes before presentation and callbacks.

Effect Group containing Play Audio Clip, Enable Disable Object, Invoke Unity Event, and Debug Item Effect, with Debug Item Effect selected to show Enabled, Delay, Message, Bindings, and States

Containing module Invocation and defaults
Usable Generic Item Effects On Start Use off, On Use on, On Use Update off, On Use Complete off. Update can repeat during a use.
Shootable Fire/Dry Fire Effects Selected fire/dry stage.
Melee Attack Effects On Start Attack on, On Complete Attack off; Substate/Attack ID -1 match all.
Throwable Throw Effects At actual release.
Magic Begin/End Generic Item Effects On Start on, On Stop off.
Aim Substate Separate start/stop Aim groups.
Generic Item Effects Impact Action At impact, still with item-owner context rather than hit data.

For Magic cast-stage effects, provide an initialized project wrapper calling EffectGroup.Initialize before availability checks/invocation. Use Begin/End when that phase timing fits.

Each Item Effect is a one-shot operation. Rows start Enabled on, Delay 0, and bindings/States empty or default. Immediate rows run in order; positive Delay independently schedules a row while later rows continue. Use one invocation per intended event or custom repeat/cancellation ownership. Inherited Bindings and States override effect values rather than activating gameplay States.

Remove unused rows when suppressing built-in effects, or use base-gated custom effects for consistent Enabled control. For groups whose caller requires all rows available, remove disabled rows instead of relying on them as a group switch.

Configure the six built-in types

Object visibility and spawning

Effect / field Inspected default and behavior
Enable Disable Object > Object Both perspective IDs -1, references empty; use a direct reference or unique Object Identifier. Missing object does nothing.
Enable Object Off; request deactivation or enable for activation.
Revert Time -1; positive schedules the opposite requested value, zero/negative leaves it. Use known initial state or explicit lifecycle groups when exact restoration matters.
Spawn Prefab > Prefab Perspective references empty; missing prefab does nothing.
Origin IDs -1, references empty; unresolved origin falls back to character.
Parent To Origin On; off unparents after spawning.
Local Position / Rotation / Scale Zero / zero / one, applied around the selected origin and parenting choice.
Life Time -1; positive returns pooled objects or destroys non-pooled objects, zero/negative keeps them alive.

First-person identifier lookup searches the active model’s complete FirstPersonObjects container; third-person lookup searches character/model. Keep IDs unique throughout that search root, including other items. This also applies to origins and Light references. Use direct references for fixed-model setups or equivalent IDs across model changes.

For temporary visuals, choose a positive lifetime and a prefab safe for its later return callback. For lifecycle-bound trails/objects, use explicit start/complete/stop and interruption cleanup rather than relying only on a revert timer.

Light, audio, and callbacks

Effect Configuration
Light Effect Assign perspective Light and Light Intensity Curve; IDs start -1, references/curve empty. Light Intensity Time 0 samples the curve once into intensity. Enable/disable the Light separately or use two samples/groups.
Play Audio Clip Initially empty Audio Config/clip set. Plays once on the owning Character Item Action GameObject, without a matching Item Effect stop control.
Invoke Unity Event Empty On Invoke Effect, no arguments; wire context-specific behavior through a project adapter.
Debug Item Effect Empty Message, followed by item-action logging with that action as Console context. Use temporarily.

For hit-position audio, use an impact action; for another item origin, use project audio/effect code. For camera response, use a camera/view module or deliberately wired event/custom effect. Activate named gameplay States through the State System or a custom operation, rather than expecting an inherited States list to do it.

Build and verify feedback

For firearm feedback, place Generic Item Effects in Fire Effects, add a short-lifetime Spawn Prefab with perspective muzzle origins, then Audio Config and an optional callback. Keep an empty click in Dry Fire Effects and target damage in Impact.

For a sword, use On Start Attack with appropriate Attack/Substate filters, then trail visibility/spawn and swing audio. Disable persistent trails at active completion and every supported interruption.

Fire once and dry-fire, then switch perspectives and repeat. Check each chosen origin/object/Light and one response per stage. Test matching/nonmatching attack filters, a delayed row followed by an immediate row, repeated use before delay expiry, disable/destruction, and a model switch. Inspect owned object cleanup and delayed callbacks explicitly.

For missing results, first inspect the containing stage/initialization, then its current perspective reference. For cross-item changes, inspect identifier uniqueness across the full search root. For Light problems, assign both Light and curve and sample a clearly different intensity. Use Debug Item Effect to distinguish a missing invocation from a valid invocation with no visible result.

Extend the effect lifecycle

ItemEffect derives from BoundStateObject. Initialize groups with a valid Action Module/Character Item Action, invoke through their availability contract, and call OnDestroy() when a custom owner ends. A group’s unavailable row does not stop subsequent rows automatically.

Custom availability checks should include base.CanInvokeEffect(). Clear delay tracking through the base invocation and preserve base destruction cleanup:

using System;
using Opsive.UltimateCharacterController.Items.Actions.Effect;
using UnityEngine;

[Serializable]
public class LogItemUseEffect : ItemEffect
{
    [SerializeField] private string m_Message = "Item effect";

    protected override void InvokeEffectInternal()
    {
        base.InvokeEffectInternal();
        Debug.Log($"{m_Message}: {m_CharacterItemAction}", m_CharacterItemAction);
    }
}

Keep target damage/force/attributes in Impact Actions; see Melee, Shootable, and Magic for their stage ownership.