Files
video-record-ue-poc/Source/AudioVideoRecord/AudioVideoRecordGameMode.h

41 lines
890 B
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/GameModeBase.h"
#include "AudioVideoRecordGameMode.generated.h"
class USoundBase;
class UAudioComponent;
/**
* Simple GameMode for a first person game
*/
UCLASS(abstract)
class AAudioVideoRecordGameMode : public AGameModeBase
{
GENERATED_BODY()
public:
AAudioVideoRecordGameMode();
/** Background music to play when the level starts. Assign in Blueprint. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Audio")
USoundBase* BGMSound = nullptr;
/** Volume multiplier for BGM (0.0 1.0). */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Audio", meta = (ClampMin = "0.0", ClampMax = "1.0"))
float BGMVolume = 0.5f;
protected:
virtual void BeginPlay() override;
private:
UPROPERTY()
UAudioComponent* BGMAudioComponent = nullptr;
};