PostEventAtLocation//Attached UE_Log

int32 UAkGameplayStatics::PostEventAtLocation(class UAkAudioEvent* in_pAkEvent, FVector Location, FRotator Orientation, const FString& EventName, UObject* WorldContextObject)
{
if ( in_pAkEvent == NULL && EventName.IsEmpty() )
{
UE_LOG(LogScript, Warning, TEXT("UAkGameplayStatics::PostEventAtLocation: No Event specified!"));
return AK_INVALID_PLAYING_ID;
}

AkDeviceAndWorld DeviceAndWorld(WorldContextObject);
if (DeviceAndWorld.IsValid())
{
if (in_pAkEvent != NULL) {
//FString *TempAkString = in_pAkEvent->GetName();
UE_LOG(LogScript, Warning, TEXT("PostEvent: %s"), *GetNameSafe(in_pAkEvent));
}

if (!EventName.IsEmpty()) {
UE_LOG(LogScript, Warning, TEXT("PostEvent: %s"), *EventName);
}
return DeviceAndWorld.AkAudioDevice->PostEventAtLocation(GET_AK_EVENT_NAME(in_pAkEvent, EventName), Location, Orientation, DeviceAndWorld.CurrentWorld);
}

return AK_INVALID_PLAYING_ID;
}

//

int32 UAkGameplayStatics::PostEventAttached(class UAkAudioEvent* in_pAkEvent, class AActor* in_pActor, FName in_attachPointName, bool in_stopWhenAttachedToDestroyed, FString EventName)
{
if (in_pAkEvent == NULL && EventName.IsEmpty())
{
UE_LOG(LogScript, Warning, TEXT("UAkGameplayStatics::PostEventAttached: No Event specified!"));
return AK_INVALID_PLAYING_ID;
}

if ( in_pActor == NULL )
{
UE_LOG(LogScript, Warning, TEXT("UAkGameplayStatics::PostEventAttached: NULL Actor specified!"));
return AK_INVALID_PLAYING_ID;
}

AkDeviceAndWorld DeviceAndWorld(in_pActor);
if (DeviceAndWorld.IsValid())
{
if (in_pAkEvent != NULL) {
//FString *TempAkString = in_pAkEvent->GetName();
UE_LOG(LogScript, Warning, TEXT("PostEvent: %s"), *GetNameSafe(in_pAkEvent));
}

if (!EventName.IsEmpty()) {
UE_LOG(LogScript, Warning, TEXT("PostEvent: %s"), *EventName);
}

return DeviceAndWorld.AkAudioDevice->PostEvent(GET_AK_EVENT_NAME(in_pAkEvent, EventName), in_pActor, 0, NULL, NULL, in_stopWhenAttachedToDestroyed);
}

return AK_INVALID_PLAYING_ID;
}

댓글

이 블로그의 인기 게시물

About AActor!!! "UObject" has no member "BeginPlay"

UNREAL Android build information

C++ 생성자 위임 (delegating constructor)