Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
UAnimNotify_PlayAudioTag 클래스 참조

#include <AnimNotify_PlayAudioTag.h>

UAnimNotify_PlayAudioTag에 대한 상속 다이어그램 :
Inheritance graph
UAnimNotify_PlayAudioTag에 대한 협력 다이어그램:
Collaboration graph

Public 멤버 함수

virtual void Notify (USkeletalMeshComponent *MeshComp, UAnimSequenceBase *Animation, const FAnimNotifyEventReference &EventReference) override
 
virtual FString GetNotifyName_Implementation () const override
 

Protected 속성

FGameplayTag AudioTag
 
bool bDebugLog = false
 

멤버 함수 문서화

◆ GetNotifyName_Implementation()

FString UAnimNotify_PlayAudioTag::GetNotifyName_Implementation ( ) const
overridevirtual
67{
68 if (AudioTag.IsValid())
69 {
70 return AudioTag.GetTagName().ToString();
71 }
72 else
73 {
74 return TEXT("Play Audio");
75 }
76}
FGameplayTag AudioTag
Definition AnimNotify_PlayAudioTag.h:28

◆ Notify()

void UAnimNotify_PlayAudioTag::Notify ( USkeletalMeshComponent *  MeshComp,
UAnimSequenceBase *  Animation,
const FAnimNotifyEventReference &  EventReference 
)
overridevirtual
16{
17 if (MeshComp == nullptr || AudioTag.IsValid() == false)
18 {
19 return;
20 }
21
22 AActor* OwnerActor = MeshComp->GetOwner();
23 if (OwnerActor == nullptr)
24 {
25#if WITH_EDITORONLY_DATA
26 TryPlayPreviewAudio(MeshComp);
27#endif
28 return;
29 }
30
31 TArray<UAudioEmitterComponent*> AudioTagComponents;
32 OwnerActor->GetComponents<UAudioEmitterComponent>(AudioTagComponents);
33
34 if (bDebugLog && AudioTagComponents.IsEmpty())
35 {
36 LOG_WARNING(LogCK, "AudioTagComponent 없음. Owner: %s, AudioTag: %s", *OwnerActor->GetName(), *AudioTag.ToString());
37 }
38
39 for (UAudioEmitterComponent* AudioTagComponent : AudioTagComponents)
40 {
41 if (AudioTagComponent == nullptr)
42 {
43 continue;
44 }
45
46 if (AudioTagComponent->PlayAudioTag(AudioTag))
47 {
48 return;
49 }
50 }
51
52#if WITH_EDITORONLY_DATA
53 if (TryPlayPreviewAudio(MeshComp))
54 {
55 return;
56 }
57#endif
58
59 if (bDebugLog)
60 {
61 LOG_WARNING(LogCK, "AudioTag 재생 실패. Owner: %s, ComponentCount: %d, AudioTag: %s", *OwnerActor->GetName(), AudioTagComponents.Num(), *AudioTag.ToString());
62 }
63}
#define LOG_WARNING(Category, Format,...)
Definition CK_UE.h:39
bool bDebugLog
Definition AnimNotify_PlayAudioTag.h:31

멤버 데이터 문서화

◆ AudioTag

FGameplayTag UAnimNotify_PlayAudioTag::AudioTag
protected

◆ bDebugLog

bool UAnimNotify_PlayAudioTag::bDebugLog = false
protected

이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: