RealDocs

UGameplayStatics::PlayDialogue2D

function Engine Blueprint Since 4.9
#include "Kismet/GameplayStatics.h"
Access: public Specifiers: staticUFUNCTIONBlueprintCallableBlueprintCosmetic

Description

Plays a UDialogueWave at 2D (non-spatialized) volume, suitable for UI or cinematic dialogue where positional audio is not needed. Fire-and-forget — no component is returned.

Caveats & Gotchas

  • FDialogueContext must have a valid Speaker set; if the context cannot resolve a SoundBase for the given speaker/target pair, no audio plays and there is no error in non-debug builds.
  • Subtitles associated with the dialogue wave are only displayed if subtitles are enabled via SetSubtitlesEnabled; the function itself does not check or warn about subtitle state.
  • This is a fire-and-forget call — there is no way to stop or fade out the resulting sound; use SpawnDialogue2D if you need playback control.

Signature

static ENGINE_API void PlayDialogue2D(const UObject* WorldContextObject, UDialogueWave* Dialogue, const struct FDialogueContext& Context, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f)

Parameters

Name Type Description Default
WorldContextObject const UObject* Object used to obtain the world context.
Dialogue UDialogueWave* The dialogue wave asset to play.
Context const struct FDialogueContext& Speaker and target context used to resolve the correct audio variation.
VolumeMultiplier float Linear scalar applied to the volume. 1.f
PitchMultiplier float Linear scalar applied to the pitch. 1.f
StartTime float Offset in seconds into the dialogue to begin playback. 0.f

Return Type

void

Example

Play UI announcement dialogue C++
FDialogueContext Ctx;
Ctx.Speaker = SpeakerVoice;
Ctx.Targets.Add(PlayerVoice);
UGameplayStatics::PlayDialogue2D(this, AnnouncementWave, Ctx);

Version History

Introduced in: 4.9

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.