RealDocs

UAudioComponent::SetModulationRouting

function Engine Blueprint Since 5.0
#include "Components/AudioComponent.h"
Access: public Specifiers: UFUNCTIONBlueprintCallable

Description

Assigns the full set of modulators for a given modulation destination on this component, overwriting whatever was previously set. Use AddModulationRouting instead if you want to add modulators without clearing the existing set.

Caveats & Gotchas

  • • This overwrites all modulators currently routed to Destination — it does not merge with the existing set the way AddModulationRouting does.
  • • RoutingMethod defaults to EModulationRouting::Inherit, which follows the routing method defined on the underlying sound asset; pass an explicit value to override it.
  • • Changes only take effect on active sounds once the modulation system processes the update — there's no guarantee of an instantly audible change.

Signature

void SetModulationRouting(const TSet<USoundModulatorBase*>& Modulators, const EModulationDestination Destination, const EModulationRouting RoutingMethod = EModulationRouting::Inherit)

Parameters

Name Type Description Default
Modulators const TSet<USoundModulatorBase*>& Set of modulator objects to route to the destination. —
Destination const EModulationDestination The modulation destination (e.g. volume, pitch) to assign the modulators to. —
RoutingMethod const EModulationRouting How this component's routing combines with the sound asset's own modulation routing. EModulationRouting::Inherit

Return Type

void

Example

Overriding volume modulation C++
TSet<USoundModulatorBase*> Modulators;
Modulators.Add(MyLFOModulator);
AudioComponent->SetModulationRouting(Modulators, EModulationDestination::Volume, EModulationRouting::Override);

Version History

Introduced in: 5.0

Version Status Notes
5.6 stable —

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.