UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AnimNotify_PlaySound.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3
4#pragma once
5
6#include "CoreMinimal.h"
9#include "AnimNotify_PlaySound.generated.h"
10
12class USkeletalMeshComponent;
13class USoundBase;
14
15UCLASS(const, hidecategories=Object, collapsecategories, Config = Game, meta=(DisplayName="Play Sound"), MinimalAPI)
17{
19
20public:
21
23
24 // Begin UAnimNotify interface
25 ENGINE_API virtual FString GetNotifyName_Implementation() const override;
26 UE_DEPRECATED(5.0, "Please use the other Notify function instead")
27 ENGINE_API virtual void Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation) override;
28 ENGINE_API virtual void Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) override;
29#if WITH_EDITOR
30 ENGINE_API virtual void ValidateAssociatedAssets() override;
31#endif
32 // End UAnimNotify interface
33
34 // Sound to Play
35 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AnimNotify", meta=(ExposeOnSpawn = true))
37
38 // Volume Multiplier
39 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AnimNotify", meta=(ExposeOnSpawn = true))
40 float VolumeMultiplier;
41
42 // Pitch Multiplier
43 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AnimNotify", meta=(ExposeOnSpawn = true))
44 float PitchMultiplier;
45
46 // If this sound should follow its owner
47 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AnimNotify")
48 uint32 bFollow:1;
49
50#if WITH_EDITORONLY_DATA
51 UPROPERTY(Config, EditAnywhere, Category = "AnimNotify")
53#endif
54
55 // Socket or bone name to attach sound to
56 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AnimNotify", meta=(EditCondition="bFollow", ExposeOnSpawn = true))
57 FName AttachName;
58};
59
60
61
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
return true
Definition ExternalRpcRegistry.cpp:601
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UCLASS(...)
Definition ObjectMacros.h:776
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition NameTypes.h:617
Definition AnimNotify_PlaySound.h:17
Definition AnimNotify.h:52
Definition AnimSequenceBase.h:37
Definition SoundBase.h:109
Definition AnimNotifyQueue.h:22
Definition ObjectPtr.h:488