RealDocs

UAudioComponent::SetIntParameter

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

Description

Sets a named integer parameter that is forwarded to the sound instance if it is currently playing, or applied at next play otherwise.

Caveats & Gotchas

  • Like the other parameter setters, updates are suppressed on already-playing instances if bDisableParameterUpdatesWhilePlaying is true.
  • The parameter name must be recognized by the sound asset's parameter interface (e.g. a MetaSound int input) or the call has no observable effect.

Signature

UFUNCTION(BlueprintCallable, meta = (DisplayName = "Set Integer Parameter"), Category = "Audio|Parameter")
virtual void SetIntParameter(FName InName, int32 InInt) override;

Parameters

Name Type Description Default
InName FName The name of the parameter to set, matching a parameter interface exposed by the sound.
InInt int32 The value to assign to the named parameter.

Return Type

void

Example

Set an integer variation index C++
AudioComponent->SetIntParameter(TEXT("FootstepSurfaceIndex"), 2);

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.