Component API
UAgenticFoleyComponent methods, properties, and delegates
The central foley component. Handles surface tracing, audio dispatch, AI noise, GAS cue replication, slot bank management, footprints, trails, and character SFX.
| Property | Type | Default | Description |
|---|
FoleyData | UAgenticFoleyDataAsset* | None | Per-surface audio/VFX configuration. Required. |
FootSockets | TArray<FName> | [foot_l, foot_r] | Foot bone names for biped/quadruped support. |
| Property | Type | Default | Description |
|---|
TraceDistance | float | 200.0 | Downward trace length in cm. |
TraceChannel | ECollisionChannel | Visibility | Collision channel for ground traces. |
| Property | Type | Default | Description |
|---|
FoleyGameplayCueTag | FGameplayTag | GameplayCue.Agentic.Foley | Tag for GAS cue dispatch. |
| Property | Type | Default | Description |
|---|
BaseSlotGain | float (0.0-5.0) | 0.25 | Base gain for equipment slot layers. Final slot gain = BaseSlotGain × SlotBank event VolumeMultiplier. |
Master volume lives on the DataAsset, not the component. See GlobalVolumeMultiplier on UAgenticFoleyDataAsset for the 0.1-3.0 master scalar, and VolumeMultiplier on each FAgenticFoleySurface entry for per-surface tuning. Both are composed into the final volume on every dispatch path (PlayMetaSoundFoley, PlayFoleyAtOwner).
| Property | Type | Default | Description |
|---|
bEnableFootprints | bool | false | Enable RT footprint stamps. |
FootprintTexture | UTexture* | None | Default boot sole texture. |
FootprintSize | FVector2D | (25, 40) | Stamp size in cm. |
FootprintConfigs | TArray<FAgenticFootprintConfig> | Empty | Per-foot texture overrides. |
| Property | Type | Default | Description |
|---|
bEnableTrails | bool | false | Enable continuous drag trails. |
| Property | Type | Default | Description |
|---|
CharacterSFXConfig | UDataAsset* | None | Breathing/effort configuration. |
| Method | Description |
|---|
TriggerFoleyEventForFeet(MeshComp, EventTag, FootSockets, bTraceSideways, Volume, Pitch, bPlayAudio) | Fire foley for specific feet. Main entry point for AnimNotify-driven footsteps. |
TriggerFoleyFromSocket(SocketName, MeshComp, EventTag, Volume, Pitch) | Fire foley from any named socket (weapon impacts, shield bashes). |
TriggerFoleyReplicated(EventTag, Volume, Pitch) | Replicated foley for BP events (jump, land, slide). Routes through Server RPC. |
StopFoleyReplicated(EventTag) | Stop a looping replicated foley event (slide release). |
PlayFoleyAtOwner(EventTag, Volume, Pitch, bTraceSideways) | Recommended single-call BP entry. Collapses ResolveFoleySound → IsValid → SpawnSoundAttached → ApplySlotParameters → DispatchFoleyVFX into one node. Composes final audio volume as Volume × surface VolumeMultiplier × DA GlobalVolumeMultiplier, so per-surface tuning from the DataAsset applies automatically. Returns the spawned UAudioComponent (or nullptr). Local-only — do not call from GAS cue handlers or replicated functions or audio will double-fire. |
| Method | Description |
|---|
ResolveFoleySound(EventTag, OutSound, OutSurface, bTraceSideways) | Trace the ground, read the physical surface, and resolve the MetaSound for the event. Fills OutSound and OutSurface. Also updates trail brush state and broadcasts OnFoleyEventResolved. Use this if you need the sound or surface without spawning — otherwise prefer PlayFoleyAtOwner. Local-only. |
GetAudioBankForSurface(SurfaceType) | Audio bank lookup for MetaSound routing. No side effects. |
| Method | Description |
|---|
SetSlotBank(Slot, SlotBank) | Assign a SlotBank to an equipment slot at runtime. |
ClearSlot(Slot) | Remove the SlotBank from an equipment slot. |
GetSlotBank(Slot) | Get the currently assigned SlotBank for a slot. |
| Method | Description |
|---|
ApplySlotParameters(AudioComp, EventTag) | Push active slot bank parameters to a MetaSound AudioComponent. |
| Delegate | Signature | Description |
|---|
OnFoleyEventResolved | FAgenticFoleyTraceResult | Fires after every resolved foley event. Subscribe for breathing/SFX triggers. |