Navigation
API > API/Plugins > API/Plugins/VCamCore
Provides a modular system for editing a UCineCameraComponent using user widgets. This component must be attached as a direct child of UCineCameraComponent.
This component implements a Model-View-Controller architecture where modifiers are the model, output providers the view, and this component the controller.
There are three aspects to this component:
- Modifiers implement logic for changing properties on the UCineCameraComponent. Modifiers contain ConnectionPoints. ConnectionPoints can optionally expose UInputActions (Enhanced Input) that can be invoked by widgets.
- Output providers create and render widgets (possibly streaming them). Usually output providers create UVCamWidgets, which are special widgets that can connect to ConnectionPoints. Widgets interact with modifiers in two ways:
- Simple: trigger input actions that modifiers are subscribed to and expose via connections.
- Advanced: query whether modifiers implement certain custom defined interfaces. UVCamWidget Connections can be configured with required and optional interfaces.
- UVCamSubsystems exist for as long as a UVCamComponent is enabled (this is comparable to ULocalPlayerSubsystem). One notable such system is the UInputVCamSubsystem which allows UVCamComponents to bind to input devices similarly to how APlayerControllers do in shipped games.
| Name | UVCamComponent |
| Type | class |
| Header File | /Engine/Plugins/VirtualProduction/VirtualCameraCore/Source/VCamCore/Public/VCamComponent.h |
| Include Path | #include "VCamComponent.h" |
Syntax
UCLASS (Blueprintable, ClassGroup=VCam, HideCategories=(Mobility),
Meta=(BlueprintSpawnableComponent))
class UVCamComponent : public USceneComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → USceneComponent → UVCamComponent
Implements Interfaces
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnComponentReplaced | FOnComponentReplaced | There are situations in the editor where the component may be replaced by another component as part of the actor being reconstructed This event will notify you of that change and give you a reference to the new component. | VCamComponent.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AppliedInputContexts | TArray< TObjectPtr< UInputMappingContext > > | Store the Input Mapping Contexts that have been added via this component | VCamComponent.h |
|
| bDisableComponentWhenSpawnedBySequencer | bool | If true, the component will force bEnabled to false when it is part of a spawnable in Sequencer | VCamComponent.h |
|
| bDisableOutputOnMultiUserReceiver | bool | Do we disable the output if the virtual camera is in a Multi-user session and the camera is a "receiver" from multi-user | VCamComponent.h |
|
| bEnabled | bool | Whether the VCamComponent will update every frame | VCamComponent.h |
|
| bHasInitedModifiers | bool | Whether we've already iterated through all modifiers once and initialized them. | VCamComponent.h | |
| bHasInitedOutputProviders | bool | Whether we've already iterated through all output providers once and initialized them. | VCamComponent.h | |
| bIsInitialized | bool | Whether Initialize was called but not Deinitialize yet. | VCamComponent.h | |
| bRecordAsCineCamera | bool | Affects recordings in Take Recorder. | VCamComponent.h |
|
| InputComponent | TObjectPtr< UInputComponent > | From Ben H: Mark this as Transient/DuplicateTransient so that it is saved on the BP CDO and nowhere else and handled correctly during duplication operations (copy/paste etc) | VCamComponent.h |
|
| InputDeviceSettings | FVCamInputDeviceConfig | VCamComponent.h |
|
|
| InputProfile | FVCamInputProfile | VCamComponent.h |
|
|
| LastEvaluationTime | double | VCamComponent.h | ||
| LiveLinkSubject | FLiveLinkSubjectName | LiveLink subject name for the incoming camera transform | VCamComponent.h |
|
| ModifierContext | TObjectPtr< UVCamModifierContext > | Modifier Context object that can be accessed by the Modifier Stack | VCamComponent.h |
|
| ModifierStack | TArray< FModifierStackEntry > | List of Modifiers (executed in order) | VCamComponent.h |
|
| OnSessionShutdownHandle | FDelegateHandle | Delegate handle for a the callback when a session shuts down | VCamComponent.h | |
| OnSessionStartupHandle | FDelegateHandle | Delegate handle for a the callback when a session starts up | VCamComponent.h | |
| OutputProviders | TArray< TObjectPtr< UVCamOutputProviderBase > > | List of Output Providers (executed in order) | VCamComponent.h |
|
| PIEMode | enum UVCamComponent::EPIEState | VCamComponent.h | ||
| PreviousUpdateTime | double | VCamComponent.h | ||
| Role | FGameplayTag | The role of this virtual camera. | VCamComponent.h |
|
| SavedModifierStack | TArray< FModifierStackEntry > | VCamComponent.h | ||
| SavedOutputProviders | TArray< UVCamOutputProviderBase * > | VCamComponent.h | ||
| SecondsSinceLastLocationUpdate | double | VCamComponent.h | ||
| SubsystemCollection | FObjectSubsystemCollection< UVCamSubsystem > | Initialize and deinitialize calls match our | VCamComponent.h | |
| UpdateFrequencyMs | float | Indicates the frequency which camera updates are sent when in Multi-user mode. | VCamComponent.h |
|
| ViewportLocker | FVCamViewportLocker | Sync with output providers keeping track of which viewports are locked. | VCamComponent.h |
|
| WeakSession | TWeakPtr< IConcertClientSession > | Weak pointer to the client session with which to send events. May be null or stale. | VCamComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddInputMappingContext
(
UInputMappingContext* Context, |
Adds an explicitly provided Input Mapping Context to the input system | VCamComponent.h | |
void AddInputMappingContext
(
const UVCamModifier* Modifier |
Adds the Input Mapping Context from a modifier, if it exists, to the input system | VCamComponent.h | |
bool AddInputProfileWithCurrentlyActiveMappings
(
const FName ProfileName, |
Tries to add a new Input Profile to the VCam Input Settings and populates it with any currently active player mappable keys Note: The set of currently active player mappable keys may be larger than the set of mappings in this component's Input Profile | VCamComponent.h |
|
bool AddModifier
(
const FName Name, |
Add a modifier to the stack with a given name. | VCamComponent.h |
|
bool AddOutputProvider
(
TSubclassOf< UVCamOutputProviderBase > ProviderClass, |
VCamComponent.h |
|
|
void ApplyComponentInstanceData
(
FVCamComponentInstanceData& ComponentInstanceData, |
Applies the component instance cache | VCamComponent.h | |
void ApplyInputProfile() |
Call this after modifying the InputProfile in code to update the player mapped keys | VCamComponent.h | |
bool CanUpdate() |
VCamComponent.h | ||
| Returns all the modifier names used to identifying connection points. | VCamComponent.h |
|
|
void GetAllModifiers
(
TArray< UVCamModifier* >& Modifiers |
Returns all the Modifiers in the Component's Stack Note: It's possible not all Modifiers will be valid (such as if the user has not set a class for the modifier in the details panel) | VCamComponent.h |
|
void GetAllOutputProviders
(
TArray< UVCamOutputProviderBase* >& Providers |
VCamComponent.h |
|
|
TArray< FEnhancedActionKeyMapping > GetAllPlayerMappableActionKeyMappings() |
Searches the currently active input system for all registered key mappings that are marked as Player Mappable. | VCamComponent.h |
|
bool GetDisableComponentWhenSpawnedBySequencer() |
VCamComponent.h |
|
|
bool GetDisableOutputOnMultiUserReceiver() |
VCamComponent.h |
|
|
UInputComponent * GetInputComponent() |
VCamComponent.h | ||
const FVCamInputDeviceConfig & GetInputDeviceSettings() |
Gets the current input device settings being used (if this component is enabled) or that will be used (if not enabled). | VCamComponent.h |
|
const FVCamInputProfile & GetInputProfile() |
VCamComponent.h |
|
|
UInputVCamSubsystem * GetInputVCamSubsystem() |
Gets the subsystem responsible for input handling. | VCamComponent.h |
|
bool GetLiveLinkDataForCurrentFrame
(
FLiveLinkCameraBlueprintData& LiveLinkData |
VCamComponent.h |
|
|
FLiveLinkSubjectName GetLiveLinkSubobject() |
VCamComponent.h |
|
|
UVCamModifier * GetModifierByIndex
(
const int32 Index |
Returns the Modifier in the Stack with the given index if it exist. | VCamComponent.h |
|
UVCamModifier * GetModifierByName
(
const FName Name |
Tries to find a Modifier in the Stack with the given name. | VCamComponent.h |
|
UVCamModifierContext * GetModifierContext() |
Get the current Modifier Context | VCamComponent.h |
|
void GetModifiersByClass
(
TSubclassOf< UVCamModifier > ModifierClass, |
Given a specific Modifier class, returns a list of matching Modifiers | VCamComponent.h |
|
void GetModifiersByInterface
(
TSubclassOf< UInterface > InterfaceClass, |
Given a specific Interface class, returns a list of matching Modifiers | VCamComponent.h |
|
const TArray< FModifierStackEntry > & GetModifierStack() |
VCamComponent.h | ||
int32 GetNumberOfModifiers() |
VCamComponent.h |
|
|
int32 GetNumberOfOutputProviders() |
VCamComponent.h |
|
|
UVCamOutputProviderBase * GetOutputProviderByIndex
(
const int32 ProviderIndex |
VCamComponent.h |
|
|
const TArray< TObjectPtr< UVCamOutputProviderBase > > & GetOutputProviders() |
VCamComponent.h |
|
|
void GetOutputProvidersByClass
(
TSubclassOf< UVCamOutputProviderBase > ProviderClass, |
VCamComponent.h |
|
|
PRAGMA_DISABLE_DEPRECATION_WARNINGSTArray< FEnhancedActionKeyMapping > GetPlayerMappableKeys() |
Returns a list of all player mappable keys that have been registered | VCamComponent.h |
|
| Searches the currently active input system for the current key mapped to a given input mapping If there is not a player mapped key, then this will return EKeys::Invalid. | VCamComponent.h |
|
|
bool GetRecordAsCineCamera() |
VCamComponent.h |
|
|
FGameplayTag GetRole() |
VCamComponent.h |
|
|
TSubsystemClass * GetSubsystem
(
const TSubclassOf< TSubsystemClass >& SubsystemClass |
VCamComponent.h | ||
TArray< UVCamSubsystem * > GetSubsystemArray
(
const TSubclassOf< UVCamSubsystem >& Class |
Gets all subsystems implementing this interface | VCamComponent.h |
|
UCineCameraComponent * GetTargetCamera() |
VCamComponent.h |
|
|
const FVCamViewportLocker & GetViewportLockState() |
VCamComponent.h | ||
virtual void InjectInputForAction
(
const UInputAction* Action, |
Injects an input action. | VCamComponent.h |
|
virtual void InjectInputVectorForAction
(
const UInputAction* Action, |
Injects an input vector for action. | VCamComponent.h |
|
bool InsertModifier
(
const FName Name, |
Insert a modifier to the stack with a given name and index. | VCamComponent.h |
|
bool InsertOutputProvider
(
int32 Index, |
VCamComponent.h |
|
|
bool IsEnabled() |
VCamComponent.h |
|
|
bool IsInitialized() |
Whether this component is initialized, i.e. the input subsystem is set up and the output providers are allowed to be active. | VCamComponent.h | |
void OnOutputProvidersEdited
(
FPropertyChangedChainEvent& PropertyChangedEvent |
VCamComponent.h | ||
void RegisterObjectForInput
(
UObject* Object |
Registers the given object with the VCamComponent's Input Component This allows dynamic input bindings such as input events in blueprints to work correctly Note: Ensure you call UnregisterObjectForInput when you are finished with the object otherwise input events will still fire until GC actually destroys the object | VCamComponent.h |
|
void RemoveAllModifiers() |
Remove all Modifiers from the Stack. | VCamComponent.h |
|
void RemoveAllOutputProviders() |
VCamComponent.h |
|
|
void RemoveInputMappingContext
(
const UVCamModifier* Modifier |
Removes the Input Mapping Context from a modifier, if it exists, from the input system | VCamComponent.h | |
void RemoveInputMappingContext
(
UInputMappingContext* Context |
Removes an explicitly provided Input Mapping Context to the input system | VCamComponent.h | |
bool RemoveModifier
(
const UVCamModifier* Modifier |
VCamComponent.h |
|
|
bool RemoveModifierByIndex
(
const int ModifierIndex |
VCamComponent.h |
|
|
bool RemoveModifierByName
(
const FName Name |
VCamComponent.h |
|
|
bool RemoveOutputProvider
(
const UVCamOutputProviderBase* Provider |
VCamComponent.h |
|
|
bool RemoveOutputProviderByIndex
(
const int32 ProviderIndex |
VCamComponent.h |
|
|
bool SaveCurrentInputProfileToSettings
(
const FName ProfileName |
Saves the current input profile settings to the VCam Input Settings using the provided Profile Name. | VCamComponent.h |
|
void SetDisableComponentWhenSpawnedBySequencer
(
bool bValue |
VCamComponent.h |
|
|
void SetDisableOutputOnMultiUserReceiver
(
bool bValue |
VCamComponent.h |
|
|
void SetEnabled
(
bool bNewEnabled |
Sets whether the VCamComponent will update every frame | VCamComponent.h |
|
void SetInputDeviceSettings
(
const FVCamInputDeviceConfig& NewInputProfile |
Propagates devices settings all the way to the player input. | VCamComponent.h |
|
void SetInputProfile
(
const FVCamInputProfile& NewInputProfile |
VCamComponent.h |
|
|
bool SetInputProfileFromName
(
const FName ProfileName |
Attempts to apply key mapping settings from an input profile defined in VCam Input Settings Returns whether the profile was found and able to be applied | VCamComponent.h |
|
void SetLiveLinkSubobject
(
FLiveLinkSubjectName Value |
VCamComponent.h |
|
|
void SetModifierContextClass
(
TSubclassOf< UVCamModifierContext > ContextClass, |
Sets the Modifier Context to a new instance of the provided class | VCamComponent.h |
|
bool SetModifierIndex
(
int32 OriginalIndex, |
Moves an existing modifier in the stack from its current index to a new index. | VCamComponent.h |
|
bool SetOutputProviderIndex
(
int32 OriginalIndex, |
Moves an existing Output Provider in the stack from its current index to a new index. | VCamComponent.h |
|
void SetRecordAsCineCamera
(
bool bValue |
VCamComponent.h |
|
|
void SetRole
(
FGameplayTag Value |
VCamComponent.h |
|
|
void SetViewportLockState
(
const FVCamViewportLocker& NewLockState |
VCamComponent.h | ||
void UnregisterObjectForInput
(
UObject* Object |
Unregisters the given object with the VCamComponent's Input Component | VCamComponent.h |
|
void Update() |
VCamComponent.h |
Overridden from USceneComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnAttachmentChanged() |
VCamComponent.h |
Overridden from UActorComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CheckForErrors() |
VCamComponent.h | ||
virtual void EndPlay
(
EEndPlayReason::Type Reason |
VCamComponent.h | ||
virtual TStructOnScope< FActorComponentInstanceData > GetComponentInstanceData() |
VCamComponent.h | ||
virtual void OnComponentCreated() |
VCamComponent.h | ||
virtual void OnComponentDestroyed
(
bool bDestroyingHierarchy |
VCamComponent.h | ||
virtual void OnRegister() |
VCamComponent.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginDestroy() |
VCamComponent.h | ||
virtual void PostEditChangeChainProperty
(
FPropertyChangedChainEvent& PropertyChangedEvent |
VCamComponent.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
VCamComponent.h | ||
virtual void PostLoad() |
VCamComponent.h | ||
virtual void PreEditChange
(
FEditPropertyChain& PropertyAboutToChange |
VCamComponent.h | ||
virtual void PreEditChange
(
FProperty* PropertyAboutToChange |
VCamComponent.h | ||
virtual void PreSave
(
FObjectPreSaveContext SaveContext |
VCamComponent.h | ||
virtual void Serialize
(
FArchive& Ar |
VCamComponent.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddReferencedObjects
(
UObject* InThis, |
VCamComponent.h | ||
static void CopyLiveLinkDataToCamera
(
const FLiveLinkCameraBlueprintData& LiveLinkData, |
VCamComponent.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| TargetViewport_DEPRECATED | EVCamTargetViewportID | Which viewport to use for this VCam. | VCamComponent.h |