Navigation
API > API/Plugins > API/Plugins/VCamCore
Output providers implement methods of overlaying a widget onto a target viewport. The composition of viewport and widget is then usually streamed to an application outside the engine, e.g. via Pixel Streaming or Remote Session.
To start outputting, the owning UVCamComponent must be enabled and the output provider activated.
Output providers are managed by UVCamComponent, which own them and must be attached as a child to a UCineCameraComponent. Output providers have a target viewport that the widget is overlayed onto. The target viewport can be locked to the target camera, which happens when:
The output provider is outputting IsOutputting() == true
The output provider is configured to do so, either by 2.1 NeedsForceLockToViewport returning true or 2.2 UVCamComponent::ViewportLocker being configured accordingly. When a viewport is locked, the owning output provider can affect its resolution (see bUseOverrideResolution and OverrideResolution).
A concept of viewport ownership is implemented in FViewportManager ensuring that at most 1 output provider affects a viewport's lock and resolution at a time; the first output provider to request lock, gets the ownership over that viewport. When lock, resolution or target viewport change, call RequestResolutionRefresh to updat the viewport state.
| Name | UVCamOutputProviderBase |
| Type | class |
| Header File | /Engine/Plugins/VirtualProduction/VirtualCameraCore/Source/VCamCore/Public/Output/VCamOutputProviderBase.h |
| Include Path | #include "Output/VCamOutputProviderBase.h" |
Syntax
UCLASS (Abstract, BlueprintType, EditInlineNew, CollapseCategories)
class UVCamOutputProviderBase : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UVCamOutputProviderBase
Derived Classes
UVCamOutputProviderBase derived class hierarchy
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UVCamOutputProviderBase() |
Output/VCamOutputProviderBase.h |
Classes
| Name | Remarks |
|---|---|
| FActivationDelegate_Blueprint |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FActivationDelegate | TMulticastDelegate_OneParam< void, bool > | Output/VCamOutputProviderBase.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bUseOverrideResolution | bool | Override the default output resolution with a custom value - NOTE you must toggle bIsActive off then back on for this to take effect | Output/VCamOutputProviderBase.h |
|
| OnActivatedDelegate | FActivationDelegate | Output/VCamOutputProviderBase.h | ||
| OnActivatedDelegate_Blueprint | FActivationDelegate_Blueprint | Called when the activation state of this output provider changes. | Output/VCamOutputProviderBase.h |
|
| OverrideResolution | FIntPoint | When bUseOverrideResolution is set, use this custom resolution | Output/VCamOutputProviderBase.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bInitialized | bool | Output/VCamOutputProviderBase.h |
|
|
| bIsActive | bool | If set, this output provider will execute every frame | Output/VCamOutputProviderBase.h |
|
| bIsActuallyActive | bool | This makes sure that every OnActivate call is matched with exactly one OnDeactivate call, and vice versa. | Output/VCamOutputProviderBase.h |
|
| bIsUndoing | bool | Prevents certain messages from being generated while undoing. | Output/VCamOutputProviderBase.h |
|
| bWasOutputSuspendedWhileActive | bool | SuspendOutput can disable output while we're active. | Output/VCamOutputProviderBase.h |
|
| ModifyViewportPostProcessSettingsDelegateHandle | FDelegateHandle | Handle to ModifyViewportPostProcessSettings | Output/VCamOutputProviderBase.h | |
| PlayersWhoseViewTargetsWereSet | TSet< TWeakObjectPtr< APlayerController > > | If in a game world, these player controllers must have their view targets reverted when this output provider is deactivated. | Output/VCamOutputProviderBase.h |
|
| PostProcessSettingsForWidget | FPostProcessSettings | We call UVPFullScreenUserWidget::SetCustomPostProcessSettingsSource(this), which will cause these settings to be discovered. | Output/VCamOutputProviderBase.h |
|
| TargetCamera | TSoftObjectPtr< UCineCameraComponent > | Output/VCamOutputProviderBase.h |
|
|
| TargetViewport | EVCamTargetViewportID | Which viewport to use for this VCam | Output/VCamOutputProviderBase.h |
|
| UMGClass | TSubclassOf< UUserWidget > | The UMG class to be rendered in this output provider | Output/VCamOutputProviderBase.h |
|
| UMGWidget | TObjectPtr< UVPFullScreenUserWidget > | Valid when active and if UMGClass is valid. | Output/VCamOutputProviderBase.h |
|
| UVCamComponent | friend | Output/VCamOutputProviderBase.h | ||
| WidgetSnapshot | FWidgetTreeSnapshot | FOutputProviderLayoutCustomization allows remapping connections and their bound widgets. | Output/VCamOutputProviderBase.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool CanToggleActivation() |
Output/VCamOutputProviderBase.h |
|
|
virtual void Deinitialize() |
Called when the provider is being shutdown such as before changing level or on exit | Output/VCamOutputProviderBase.h | |
int32 FindOwnIndexInOwner() |
Gets the index of this output provider in the owning UVCamComponent::OutputProviders array. | Output/VCamOutputProviderBase.h | |
UTextureRenderTarget2D * GetFinalOutputRenderTarget() |
Get the current TexturRenderTarget2D for the output provider. This value can be null. | Output/VCamOutputProviderBase.h |
|
UGameplayViewTargetPolicy * GetGameplayViewTargetPolicy() |
Output/VCamOutputProviderBase.h | ||
UVCamOutputProviderBase * GetOtherOutputProviderByIndex
(
int32 Index |
Utility that gets the owning VCam component and gets another output provider by its index. | Output/VCamOutputProviderBase.h | |
TSharedPtr< FSceneViewport > GetSceneViewport
(
EVCamTargetViewportID InTargetViewport |
Gets the viewport identified by the passed in parameters. | Output/VCamOutputProviderBase.h | |
| Output/VCamOutputProviderBase.h | |||
TSharedPtr< FSceneViewport > GetTargetSceneViewport() |
Gets the scene viewport identified by the currently configured TargetViewport. | Output/VCamOutputProviderBase.h | |
EVCamTargetViewportID GetTargetViewport() |
Output/VCamOutputProviderBase.h |
|
|
TSubclassOf< UUserWidget > GetUMGClass() |
Output/VCamOutputProviderBase.h |
|
|
| Output/VCamOutputProviderBase.h |
|
||
UVCamComponent * GetVCamComponent() |
Output/VCamOutputProviderBase.h |
|
|
virtual void Initialize() |
Called when the provider is brought online such as after instantiating or loading a component containing this provider Use Initialize for any setup logic that needs to survive between Start / Stop cycles such as spawning transient objects | Output/VCamOutputProviderBase.h | |
void InitTargetViewport
(
EVCamTargetViewportID Value |
Uses this version in constructors (e.g. for initializing a CDO). | Output/VCamOutputProviderBase.h | |
bool IsActivationChangeAllowed
(
bool bRequestActiveState |
Output/VCamOutputProviderBase.h | ||
bool IsActivationChangeAllowedWithReason
(
bool bRequestActiveState, |
Output/VCamOutputProviderBase.h | ||
bool IsActive() |
Returns if this output provider is currently active or not | Output/VCamOutputProviderBase.h |
|
bool IsInitialized() |
Returns if this output provider has been initialized or not | Output/VCamOutputProviderBase.h |
|
bool IsOutputting() |
Output/VCamOutputProviderBase.h | ||
virtual bool NeedsForceLockToViewport() |
Output/VCamOutputProviderBase.h | ||
void NotifyAboutComponentChange() |
Calls the VCamModifierInterface on the widget if it exists and also requests any child VCam Widgets to reconnect | Output/VCamOutputProviderBase.h | |
virtual TFuture< FVCamStringPromptResponse > PromptClientForString
(
const FVCamStringPromptRequest& Request |
Request string input from the streaming client. Returns true if the request was handled. | Output/VCamOutputProviderBase.h | |
void ReapplyOverrideResolution() |
Output/VCamOutputProviderBase.h | ||
void RequestResolutionRefresh () |
Requests that at end of the frame the target viewport's resolution is updated to match this provider's settings. | Output/VCamOutputProviderBase.h | |
void RestoreOutput() |
Restore the output state from previous call to disable output. | Output/VCamOutputProviderBase.h | |
void SetActive
(
const bool bInActive |
Called to turn on or off this output provider | Output/VCamOutputProviderBase.h |
|
void SetFinalOutputRenderTarget
(
UTextureRenderTarget2D* InFinalOuputRenderTarget |
Set the current TexturRenderTarget2D for the output provider. Null values are allowed. | Output/VCamOutputProviderBase.h |
|
void SetTargetViewport
(
EVCamTargetViewportID Value |
Output/VCamOutputProviderBase.h |
|
|
void SetUMGClass
(
const TSubclassOf< UUserWidget > InUMGClass |
Output/VCamOutputProviderBase.h |
|
|
void SuspendOutput() |
Temporarily disable the output. Caller must eventually call RestoreOutput. | Output/VCamOutputProviderBase.h | |
virtual void Tick
(
const float DeltaTime |
Output/VCamOutputProviderBase.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginDestroy() |
Output/VCamOutputProviderBase.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Output/VCamOutputProviderBase.h | ||
virtual void PostEditUndo() |
Output/VCamOutputProviderBase.h | ||
virtual void PostLoad() |
Output/VCamOutputProviderBase.h | ||
virtual void PreEditUndo() |
Output/VCamOutputProviderBase.h | ||
virtual void Serialize
(
FArchive& Ar |
Output/VCamOutputProviderBase.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CreateUMG() |
Called to create the UMG overlay widget. | Output/VCamOutputProviderBase.h | |
void DestroyUMG() |
Output/VCamOutputProviderBase.h | ||
void DisplayNotification_ViewportNotFound() |
Output/VCamOutputProviderBase.h | ||
void DisplayUMG() |
Output/VCamOutputProviderBase.h | ||
FLevelEditorViewportClient * GetTargetLevelViewportClient() |
Output/VCamOutputProviderBase.h | ||
| Output/VCamOutputProviderBase.h | |||
virtual void OnActivate() |
Called when the provider is Activated | Output/VCamOutputProviderBase.h | |
virtual void OnDeactivate() |
Called when the provider is Deactivated | Output/VCamOutputProviderBase.h | |
void OnSetTargetCamera
(
const UCineCameraComponent* InTargetCamera |
Called by owning UVCamComponent when the target camera changes. | Output/VCamOutputProviderBase.h | |
virtual void PostReapplyViewport() |
If PreReapplyViewport returned EVCamViewportChangeReply::ApplyViewportChange, then this function is called after the UMG widget has been placed in the new target viewport. | Output/VCamOutputProviderBase.h | |
| Called a new target viewport has been set while outputting but before the viewport change is processed. | Output/VCamOutputProviderBase.h | ||
void ReinitializeViewport () |
Called while a UMG widget is being outputted. | Output/VCamOutputProviderBase.h | |
void ReinitializeViewportIfNeeded () |
Called after changing viewport. | Output/VCamOutputProviderBase.h | |
void SetActiveInternal
(
bool bInActive |
Triggers all callbacks without checking whether the bIsActive flag is actually being changed. | Output/VCamOutputProviderBase.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FName GetIsActivePropertyName() |
Output/VCamOutputProviderBase.h | ||
static FName GetTargetViewportPropertyName() |
Output/VCamOutputProviderBase.h | ||
static FName GetUMGClassPropertyName() |
Output/VCamOutputProviderBase.h |