Skip to content

Desuq Cafe

Documentation menu

Native C++ Delegates

Every Blueprint-assignable OBS event (FOBSOn*) has a native C++ counterpart with a Native suffix (FOBSOn*Native). The native delegates use DECLARE_MULTICAST_DELEGATE_* instead of the dynamic variant, so they accept C++ lambdas, member functions, and AddSP/AddUObject bindings, none of which a Blueprint-only dynamic delegate can do.

The native delegates carry the same parameters as their Blueprint counterparts (the parameter names are documented in Events). They are what the plugin uses internally to keep handler caches in sync and to forward events up the event pyramid, and they are the correct binding point for non-UObject C++ code (for example, editor Details-panel customizations, which cannot AddSP to a dynamic delegate).

Usage

Bind a lambda to any native delegate. Always capture weak references and check validity inside the lambda when binding from an object with an independent lifetime.

// Connection
OBS->OnConnectedNative.AddLambda([]() { /* ... */ });
OBS->OnDisconnectedNative.AddLambda([](const FString& Reason) { /* ... */ });

// A handler-level event (lambda)
Client->GetScenes()->OnCurrentSceneChangedNative.AddLambda(
    [](const FString& SceneName, const FString& SceneUuid)
    {
        UE_LOG(LogTemp, Log, TEXT("Now on scene: %s"), *SceneName);
    });

// Member-function binding from a UObject
Client->GetOutputs()->OnRecordStateChangedNative.AddUObject(
    this, &UMyClass::HandleRecordStateChanged);

Add AddSP (shared pointer) bindings the same way. Keep the returned FDelegateHandle if you need to Remove() it later, and unbind before the bound object is destroyed.

Connection & Reconnection

Native delegateSignature
FOBSOnConnectedNative()
FOBSOnDisconnectedNative(const FString& Reason)
FOBSOnConnectionErrorNative(const FString& Error)
FOBSOnReconnectingNative(int32 AttemptNumber)
FOBSOnReconnectFailedNative()
FOBSOnRequestFailedNative(const FString& RequestType, int32 StatusCode, const FString& Comment)

Outputs (Recording / Streaming / Virtual Cam / Replay Buffer)

Native delegateSignature
FOBSOnStreamStateChangedNative(bool bActive, EOBSOutputState State)
FOBSOnRecordStateChangedNative(bool bActive, EOBSOutputState State)
FOBSOnRecordingStoppedNative(bool bActive, EOBSOutputState State, const FString& OutputPath)
FOBSOnVirtualCamStateChangedNative(bool bActive, EOBSOutputState State)
FOBSOnReplayBufferStateChangedNative(bool bActive, EOBSOutputState State)
FOBSOnReplayBufferSavedNative(const FString& SavedReplayPath)
FOBSOnRecordFileChangedNative(const FString& NewOutputPath)
FOBSOnRecordDirectoryReceivedNative(const FString& RecordDirectory)
FOBSOnOutputListReceivedNative(const TArray<FOBSOutput>& Outputs)
FOBSOnOutputStatusReceivedNative(const FOBSOutputStatus& Status)

Scenes & Scene Items

Native delegateSignature
FOBSOnCurrentSceneChangedNative(const FString& SceneName, const FString& SceneUuid)
FOBSOnSceneListUpdatedNative()
FOBSOnSceneItemTransformChangedNative(const FString& SceneName, int32 SceneItemId, const FOBSSceneItemTransform& Transform)
FOBSOnSceneItemCreatedNative(const FString& SceneName, const FString& SourceName, int32 SceneItemId, int32 SceneItemIndex)
FOBSOnSceneItemRemovedNative(const FString& SceneName, const FString& SourceName, int32 SceneItemId)
FOBSOnSceneItemLockStateChangedNative(const FString& SceneName, int32 SceneItemId, bool bLocked)
FOBSOnSceneItemEnableStateChangedNative(const FString& SceneName, int32 SceneItemId, bool bEnabled)
FOBSOnSceneItemListReindexedNative(const FString& SceneName)
FOBSOnSceneCreatedNative(const FString& SceneName, const FString& SceneUuid, bool bIsGroup)
FOBSOnSceneRemovedNative(const FString& SceneName, const FString& SceneUuid, bool bIsGroup)
FOBSOnSceneNameChangedNative(const FString& SceneUuid, const FString& OldSceneName, const FString& NewSceneName)
FOBSOnTransitionOverrideReceivedNative(const FString& SceneName, const FOBSSceneTransitionOverride& Override)

Audio

Native delegateSignature
FOBSOnInputListUpdatedNative()
FOBSOnInputMuteStateChangedNative(const FString& InputName, bool bMuted)
FOBSOnInputVolumeChangedNative(const FString& InputName, float VolumeDb, float VolumeMul)
FOBSOnInputVolumeMetersNative(const TArray<FOBSInputVolumeMeter>& Meters)
FOBSOnInputActiveStateChangedNative(const FString& InputName, bool bVideoActive)
FOBSOnMicActivityChangedNative(const FString& InputName, bool bActive)
FOBSOnInputCreatedNative(const FString& InputName, const FString& InputUuid, const FString& InputKind, const FString& UnversionedInputKind)
FOBSOnInputRemovedNative(const FString& InputName, const FString& InputUuid)
FOBSOnInputNameChangedNative(const FString& InputUuid, const FString& OldInputName, const FString& NewInputName)
FOBSOnInputKindListReceivedNative(const TArray<FString>& InputKinds)
FOBSOnInputAudioBalanceChangedNative(const FString& InputName, const FString& InputUuid, float AudioBalance)
FOBSOnInputAudioSyncOffsetChangedNative(const FString& InputName, const FString& InputUuid, int32 SyncOffsetMs)
FOBSOnInputAudioTracksChangedNative(const FString& InputName, const FString& InputUuid, const FOBSAudioTracks& AudioTracks)
FOBSOnInputAudioMonitorTypeChangedNative(const FString& InputName, const FString& InputUuid, EOBSMonitorType MonitorType)
FOBSOnSpecialInputsReceivedNative(const FOBSSpecialInputs& SpecialInputs)

OnInputVolumeMetersNative, OnInputActiveStateChangedNative, and OnMicActivityChangedNative are high-volume / opt-in streams. See Voice Activity.

Input Settings

Native delegateSignature
FOBSOnInputSettingsChangedNative(const FString& InputName, const FString& InputUuid)
FOBSOnInputSettingsReceivedNative(const FString& InputName, const FString& InputKind, TSharedPtr<FJsonObject> Settings)
FOBSOnInputPropertyItemsReceivedNative(const FString& InputName, const FString& PropertyName, const TArray<FOBSPropertyItem>& Items)

OnInputSettingsReceivedNative is native-only and exposes the raw TSharedPtr<FJsonObject> settings object (the Blueprint event surfaces a string instead).

Media Inputs

Native delegateSignature
FOBSOnMediaInputPlaybackStartedNative(const FString& InputName)
FOBSOnMediaInputPlaybackEndedNative(const FString& InputName)
FOBSOnMediaInputActionTriggeredNative(const FString& InputName, EOBSMediaInputAction Action)
FOBSOnMediaInputStatusReceivedNative(const FOBSMediaInputStatus& Status)

Transitions

Native delegateSignature
FOBSOnCurrentTransitionChangedNative(const FString& TransitionName)
FOBSOnTransitionDurationChangedNative(int32 DurationMs)
FOBSOnTransitionStartedNative(const FString& TransitionName)
FOBSOnTransitionEndedNative(const FString& TransitionName)
FOBSOnTransitionVideoEndedNative(const FString& TransitionName)
FOBSOnTransitionListUpdatedNative()

Studio Mode

Native delegateSignature
FOBSOnStudioModeStateChangedNative(bool bStudioModeEnabled)
FOBSOnCurrentPreviewSceneChangedNative(const FString& SceneName, const FString& SceneUuid)

Filters

Native delegateSignature
FOBSOnSourceFilterCreatedNative(const FString& SourceName, const FString& FilterName, const FString& FilterKind, int32 FilterIndex, bool bFilterEnabled)
FOBSOnSourceFilterRemovedNative(const FString& SourceName, const FString& FilterName)
FOBSOnSourceFilterNameChangedNative(const FString& SourceName, const FString& OldFilterName, const FString& FilterName)
FOBSOnSourceFilterSettingsChangedNative(const FString& SourceName, const FString& FilterName)
FOBSOnSourceFilterEnableStateChangedNative(const FString& SourceName, const FString& FilterName, bool bFilterEnabled)
FOBSOnSourceFilterListReindexedNative(const FString& SourceName)
FOBSOnSourceFilterListReceivedNative(const FString& SourceName)

OnSourceFilterListReceivedNative is native-only: it fires after a GetSourceFilterList response is parsed (there is no matching OBS push event), so editor UI can refresh a filter dropdown for that source.

Screenshots

Native delegateSignature
FOBSOnScreenshotCapturedNative(const FOBSScreenshotResult& Result)
FOBSOnScreenshotSavedNative(const FString& SourceName, const FString& FilePath)

Screenshot events are handler-level only. Access them via Client->GetScreenshots() (they are not re-broadcast on the Subsystem).

Configuration (Scene Collections / Profiles / Video / Stream Service / Persistent Data)

Native delegateSignature
FOBSOnCurrentSceneCollectionChangingNative(const FString& SceneCollectionName)
FOBSOnCurrentSceneCollectionChangedNative(const FString& SceneCollectionName)
FOBSOnSceneCollectionListChangedNative()
FOBSOnCurrentProfileChangingNative(const FString& ProfileName)
FOBSOnCurrentProfileChangedNative(const FString& ProfileName)
FOBSOnProfileListChangedNative()
FOBSOnVideoSettingsReceivedNative(const FOBSVideoSettings& Settings)
FOBSOnStreamServiceSettingsReceivedNative(const FOBSStreamServiceSettings& Settings)
FOBSOnPersistentDataReceivedNative(EOBSDataRealm Realm, const FString& SlotName, const FString& SlotValueJson)

General (Stats / Hotkeys / Vendor / Custom Events)

Native delegateSignature
FOBSOnStatsReceivedNative(const FOBSStats& Stats)
FOBSOnHotkeyListReceivedNative(const TArray<FString>& HotkeyNames)
FOBSOnExitStartedNative()
FOBSOnVendorEventNative(const FString& VendorName, const FString& EventType, const FString& EventDataJson)
FOBSOnCustomEventNative(const FString& EventDataJson)
FOBSOnVendorResponseReceivedNative(const FString& VendorName, const FString& RequestType, const FString& ResponseDataJson)

See also: Events for the Blueprint event names and the level (handler / Subsystem / Component) at which each is available.