UAudioComponent::SetBoolParameter
#include "Components/AudioComponent.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallablevirtualoverride
Description
Sets a named boolean parameter that is forwarded to the sound instance if it is currently playing, or applied at next play otherwise.
Caveats & Gotchas
- • Only has an effect on the currently playing sound if bDisableParameterUpdatesWhilePlaying is false; otherwise the value is stored but not pushed to already-running instances.
- • This forwards through ISoundParameterControllerInterface — the parameter name must match one recognized by the underlying sound asset (e.g. a MetaSound input), otherwise it is silently ignored.
Signature
UFUNCTION(BlueprintCallable, meta = (DisplayName = "Set Boolean Parameter"), Category = "Audio|Parameter")
virtual void SetBoolParameter(FName InName, bool InBool) override; Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InName | FName | The name of the parameter to set, matching a parameter interface exposed by the sound (e.g. a MetaSound input). | — |
| InBool | bool | The value to assign to the named parameter. | — |
Return Type
void Example
Toggle a MetaSound bool parameter C++
AudioComponent->SetBoolParameter(TEXT("IsMuffled"), true); See Also
Tags
Version History
Introduced in: 5.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?