Add initial project files and implement basic audio-visual recording functionality
This commit is contained in:
@@ -1,8 +1,23 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#include "AudioVideoRecordGameMode.h"
|
||||
#include "Kismet/GameplayStatics.h"
|
||||
#include "Components/AudioComponent.h"
|
||||
|
||||
AAudioVideoRecordGameMode::AAudioVideoRecordGameMode()
|
||||
{
|
||||
// stub
|
||||
}
|
||||
|
||||
void AAudioVideoRecordGameMode::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
|
||||
if (BGMSound)
|
||||
{
|
||||
BGMAudioComponent = UGameplayStatics::SpawnSound2D(this, BGMSound, BGMVolume);
|
||||
if (BGMAudioComponent)
|
||||
{
|
||||
BGMAudioComponent->bAutoDestroy = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user