Add initial project files and implement basic audio-visual recording functionality

This commit is contained in:
John
2026-03-12 18:53:47 +05:30
parent 0327abb1a0
commit eaa678262c
10 changed files with 153 additions and 105 deletions

View File

@@ -6,6 +6,9 @@
#include "GameFramework/GameModeBase.h"
#include "AudioVideoRecordGameMode.generated.h"
class USoundBase;
class UAudioComponent;
/**
* Simple GameMode for a first person game
*/
@@ -16,6 +19,21 @@ class AAudioVideoRecordGameMode : public AGameModeBase
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;
};