Editor Subsystem
UInhyeongOBSEditorSubsystem を使うと、Play mode に入らずにエディタコードから OBS を操作できます(接続、シーンの切り替え、録画、状態の読み取りなど)。ランタイムサブシステムのハンドラーアクセスをミラーリングしているため、同じドメインハンドラー(シーン、音声、出力など)がエディタツールでも利用できます。
同じ操作をポイント&クリックで行うには、代わりにカスタマイズされた Details Panels を使用してください。
サブシステムへのアクセス
UInhyeongOBSEditorSubsystem* EditorOBS = GEditor->GetEditorSubsystem<UInhyeongOBSEditorSubsystem>();
接続
EditorOBS->Connect("localhost", 4455, "password");
EditorOBS->Disconnect();
EditorOBS->IsConnected();
EditorOBS->GetConnectionState();
エディタサブシステムはクライアントを一度だけ生成し、再接続をまたいで保持するため、それに対して行ったバインディングは安定した状態を維持します。
ハンドラーアクセス
ハンドラーアクセスはランタイムサブシステムと同じです。
EditorOBS->GetOutputs();
EditorOBS->GetScenes();
EditorOBS->GetMediaInputs();
EditorOBS->GetAudio(); // Audio inputs, volume, mute
EditorOBS->GetInputSettings(); // Source settings (text, browser, image, etc.)
EditorOBS->GetStudioMode();
EditorOBS->GetConfig();
EditorOBS->GetTransitions();
EditorOBS->GetScreenshots();
EditorOBS->GetFilters();
直接制御
EditorOBS->SetCurrentScene("MyScene");
EditorOBS->StartRecord();
EditorOBS->SaveReplayBuffer();
EditorOBS->SetInputMute("Mic/Aux", true);
EditorOBS->AdjustInputVolume("Desktop Audio", -3.0f);
Studio Mode
EditorOBS->SetStudioModeEnabled(true);
EditorOBS->IsStudioModeEnabled();
EditorOBS->SetCurrentPreviewScene("Preview Scene");
EditorOBS->GetPreviewSceneName();
EditorOBS->TriggerStudioModeTransition();
設定:シーンコレクション
EditorOBS->GetSceneCollectionList();
EditorOBS->SetCurrentSceneCollection("My Collection");
EditorOBS->CreateSceneCollection("New Collection");
EditorOBS->GetCachedSceneCollections();
EditorOBS->GetCurrentSceneCollectionName();
設定:プロファイル
EditorOBS->GetProfileList();
EditorOBS->SetCurrentProfile("Streaming");
EditorOBS->CreateProfile("New Profile");
EditorOBS->RemoveProfile("Old Profile");
EditorOBS->GetCachedProfiles();
EditorOBS->GetCurrentProfileName();
設定:映像設定
EditorOBS->GetVideoSettings();
EditorOBS->SetVideoSettings(Settings);
EditorOBS->SetBaseResolution(1920, 1080);
EditorOBS->SetOutputResolution(1280, 720);
EditorOBS->SetFPS(60, 1);
EditorOBS->GetCachedVideoSettings();
設定:配信サービス設定
EditorOBS->GetConfig()->GetStreamServiceSettings();
EditorOBS->GetConfig()->SetStreamServiceSettings(Settings);
EditorOBS->GetConfig()->SetSimpleRTMPSettings("rtmp://server.com/live", "stream-key");
EditorOBS->GetConfig()->GetCachedStreamServiceSettings();
トランジション
EditorOBS->GetSceneTransitionList();
EditorOBS->GetCurrentSceneTransition();
EditorOBS->SetCurrentSceneTransition("Fade");
EditorOBS->SetCurrentSceneTransitionDuration(500);
EditorOBS->GetCurrentTransitionName();
EditorOBS->GetCurrentTransitionDuration();
EditorOBS->IsTransitionActive();
イベント
EditorOBS->OnConnected.AddDynamic(...);
EditorOBS->OnRecordStateChanged.AddDynamic(...);