2026-03-11 11:25:15 +05:30
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#include "AudioVideoRecordGameMode.h"
|
2026-03-12 18:53:47 +05:30
|
|
|
#include "Kismet/GameplayStatics.h"
|
|
|
|
|
#include "Components/AudioComponent.h"
|
2026-03-11 11:25:15 +05:30
|
|
|
|
|
|
|
|
AAudioVideoRecordGameMode::AAudioVideoRecordGameMode()
|
|
|
|
|
{
|
2026-03-12 18:53:47 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void AAudioVideoRecordGameMode::BeginPlay()
|
|
|
|
|
{
|
|
|
|
|
Super::BeginPlay();
|
|
|
|
|
|
|
|
|
|
if (BGMSound)
|
|
|
|
|
{
|
|
|
|
|
BGMAudioComponent = UGameplayStatics::SpawnSound2D(this, BGMSound, BGMVolume);
|
|
|
|
|
if (BGMAudioComponent)
|
|
|
|
|
{
|
|
|
|
|
BGMAudioComponent->bAutoDestroy = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-03-11 11:25:15 +05:30
|
|
|
}
|