UAudioComponent::AddModulationRouting
#include "Components/AudioComponent.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Adds the given modulators to whatever is already routed to a modulation destination on this component, without removing existing ones. Automatically switches the destination's routing method to Union.
Caveats & Gotchas
- • Performs a set union, so re-adding a modulator that's already present is a no-op — duplicates aren't created.
- • This forces the destination's routing method to EModulationRouting::Union, silently overriding any routing method previously set via SetModulationRouting.
- • To fully replace the modulator set instead of merging into it, use SetModulationRouting.
Signature
void AddModulationRouting(const TSet<USoundModulatorBase*>& Modulators, const EModulationDestination Destination) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Modulators | const TSet<USoundModulatorBase*>& | The set of modulators to add to the given destination. | — |
| Destination | const EModulationDestination | The destination to add the modulators to. | — |
Return Type
void Example
Layering a ducking modulator C++
TSet<USoundModulatorBase*> Modulators;
Modulators.Add(MyDuckingModulator);
AudioComponent->AddModulationRouting(Modulators, EModulationDestination::Volume); Tags
Version History
Introduced in: 5.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?