Skip to content

Desuq Cafe

문서 메뉴

이 번역은 최신 영어 원문보다 늦을 수 있습니다. 영어 버전 보기

빠른 시작

방법 1: OBS Component (대부분의 사용자에게 권장)

가장 간단하게 시작하는 방법입니다.

  1. 임의의 액터에 OBS Controller 컴포넌트를 추가합니다.
  2. 디테일 패널 상단의 Features 선택기에서 원하는 도메인을 켭니다 (기본값은 Scenes + Recording & Streaming이며, Connection은 항상 활성화됩니다).
  3. 연결 카드에서 연결 설정을 입력하고 Connect를 클릭합니다.
  4. 내장 컨트롤을 사용하거나 Blueprint에서 이벤트에 바인딩합니다.

디테일 패널은 코드 작성 없이 OBS를 완전히 제어할 수 있으며, 선택한 기능만 표시되므로 최소 구성으로 깔끔하게 유지됩니다.

자세한 컴포넌트 레퍼런스는 OBS Component를 참조하세요.

방법 2: OBS Trigger Volume (자동 트리거용)

플레이어가 진입하거나 이탈할 때 자동으로 OBS를 제어하는 영역을 만듭니다.

  1. 레벨에 OBS Trigger Volume 액터를 배치합니다.
  2. 트리거 형태(Box 또는 Sphere)를 설정합니다.
  3. 조건을 설정합니다 (예: 녹화 중에만 트리거).
  4. 실행할 동작을 추가합니다 (예: 장면 전환, 리플레이 저장).

다음과 같은 경우에 적합합니다.

  • 서로 다른 게임 구역에 진입할 때 장면 전환
  • 체크포인트 도달 시 리플레이 하이라이트 저장
  • 특정 구역에서 오디오 음소거 / 음소거 해제

자세한 트리거 레퍼런스는 OBS Trigger Volume을 참조하세요.

방법 3: Blueprint 스크립팅

// Get the OBS Subsystem
Get Game Instance → Get Subsystem (InhyeongOBSSubsystem)

// Connect to OBS
Connect (Host: "localhost", Port: 4455, Password: "your_password")

// Control OBS
Set Current Scene (Scene Name: "Gaming")
Start Record
Save Replay Buffer

// React to events
Bind to On Scene Changed
Bind to On Replay Buffer Saved

방법 4: C++ 통합

// Get subsystem
UInhyeongOBSSubsystem* OBS = GetGameInstance()->GetSubsystem<UInhyeongOBSSubsystem>();

// Connect and control
OBS->Connect("localhost", 4455, "password");
OBS->SetCurrentScene("Gaming");
OBS->StartRecord();

// Use handlers for advanced features
if (UInhyeongOBSMediaInputs* Media = OBS->GetMediaInputs())
{
    Media->PlayMedia("Background Music");
}

if (UInhyeongOBSFilters* Filters = OBS->GetFilters())
{
    Filters->CreateSourceFilterFromString("Webcam", "Color Correction", "color_filter_v2", "");
    Filters->SetSourceFilterEnabled("Webcam", "Color Correction", true);
}

// Bind to events (dynamic delegates for UFUNCTIONs)
OBS->OnReplayBufferSaved.AddDynamic(this, &AMyActor::HandleReplaySaved);

// Or use native delegates with lambdas
OBS->GetOutputs()->OnReplayBufferSavedNative.AddLambda([](const FString& Path) {
    UE_LOG(LogTemp, Log, TEXT("Saved: %s"), *Path);
});