#include <ComposableCameraPlayerCameraManager.h>
Inherits:
APlayerCameraManager
Public Attributes¶
| Return | Name | Description |
|---|---|---|
bool |
bSyncToControlRotation |
|
bool |
bDrawDebugInformation |
|
FName |
CurrentContext |
|
AComposableCameraCameraBase * |
RunningCamera |
|
FComposableCameraPose |
CurrentCameraPose |
|
TSet< UComposableCameraActionBase * > |
CameraActions |
|
FOnCameraFinishConstructed |
CurrentOnPreBeginplayEvent |
bSyncToControlRotation¶
bool bSyncToControlRotation { false }
bDrawDebugInformation¶
bool bDrawDebugInformation { false }
CurrentContext¶
FName CurrentContext
RunningCamera¶
AComposableCameraCameraBase * RunningCamera
CurrentCameraPose¶
FComposableCameraPose CurrentCameraPose
CameraActions¶
TSet< UComposableCameraActionBase * > CameraActions
CurrentOnPreBeginplayEvent¶
FOnCameraFinishConstructed CurrentOnPreBeginplayEvent
Public Methods¶
| Return | Name | Description |
|---|---|---|
AComposableCameraPlayerCameraManager |
||
void |
BeginPlay virtual |
|
void |
InitializeFor virtual |
|
void |
SetViewTarget virtual |
|
void |
ProcessViewRotation virtual |
|
void |
DisplayDebug virtual |
|
AComposableCameraCameraBase * |
CreateNewCamera |
|
AComposableCameraCameraBase * |
ActivateNewCamera |
Activate a new camera, optionally specifying which context it belongs to. If ContextName is valid and that context isn't on the stack yet, it is auto-pushed. If ContextName is NAME_None, the camera activates on the current active context. When switching to a different context, the new context's evaluation tree gets a reference leaf pointing to the previous context's Director for inter-context blending. |
AComposableCameraCameraBase * |
ActivateNewCamera |
Activate a new camera using a raw transition instance (not wrapped in a DataAsset). Used internally by ActivateNewCameraFromTypeAsset when the type asset provides its own DefaultTransition as an instanced UComposableCameraTransitionBase*. |
AComposableCameraCameraBase * |
ActivateNewCameraFromTypeAsset |
Activate a new camera from a Camera Type Asset (data-driven workflow). Creates a default AComposableCameraCameraBase, duplicates node templates from the type asset, wires the RuntimeDataBlock, and applies caller-provided parameter values. |
AComposableCameraCameraBase * |
ReactivateCurrentCamera |
|
void |
ResumeCamera |
|
const TSet< UComposableCameraActionBase * > & |
GetCameraActions |
|
void |
AddModifier |
|
void |
RemoveModifier |
|
void |
ApplyModifiers |
|
void |
OnModifierChanged |
|
UComposableCameraActionBase * |
AddCameraAction |
|
UComposableCameraActionBase * |
FindCameraAction |
|
void |
RemoveCameraAction |
|
void |
ExpireCameraAction |
|
void |
BindCameraActionsForNewCamera |
|
void |
PopCameraContext |
Pop a specific camera context by name. If this is the active context, the previous context resumes with an optional transition. Cannot pop the base context if it is the last one remaining. |
void |
TerminateCurrentCamera |
Terminate the current camera context — pops the active (top) context off the stack. The previous context resumes with an optional transition. Cannot pop the base context. This is the explicit way to end a context. Transient cameras trigger this automatically. |
int32 |
GetContextStackDepth const |
Get the number of contexts on the stack. |
FName |
GetActiveContextName const |
Get the name of the currently active (top) context. |
AComposableCameraCameraBase * |
GetRunningCamera const inline |
|
FComposableCameraPose |
GetCurrentCameraPose const inline |
|
UComposableCameraTransitionBase * |
ResolveTransition const |
Resolve which transition to use when switching from one type-asset camera to another. Implements the five-tier resolution chain: |
FOnCameraFinishConstructed |
PrepareResumeCallback |
Prepare the pending type-asset state for a camera that is being resumed (e.g. after a context pop). If the camera was originally built from a type asset, this restores PendingTypeAsset / PendingParameterBlock and returns a callback bound to OnTypeAssetCameraConstructed. If not a type-asset camera, returns an empty (unbound) delegate. |
AComposableCameraPlayerCameraManager¶
AComposableCameraPlayerCameraManager(const FObjectInitializer & ObjectInitializer)
BeginPlay¶
virtual
virtual void BeginPlay()
InitializeFor¶
virtual
virtual void InitializeFor(APlayerController * PlayerController)
SetViewTarget¶
virtual
virtual void SetViewTarget(AActor * NewViewTarget, FViewTargetTransitionParams TransitionParams)
ProcessViewRotation¶
virtual
virtual void ProcessViewRotation(float DeltaTime, FRotator & OutViewRotation, FRotator & OutDeltaRot)
DisplayDebug¶
virtual
virtual void DisplayDebug(class UCanvas * Canvas, const class FDebugDisplayInfo & DebugDisplay, float & YL, float & YPos)
CreateNewCamera¶
AComposableCameraCameraBase * CreateNewCamera(TSubclassOf< AComposableCameraCameraBase > CameraClass, const FComposableCameraActivateParams & ActivationParams)
ActivateNewCamera¶
AComposableCameraCameraBase * ActivateNewCamera(TSubclassOf< AComposableCameraCameraBase > CameraClass, UComposableCameraTransitionDataAsset * Transition, const FComposableCameraActivateParams & ActivationParams, FOnCameraFinishConstructed OnPreBeginplayEvent, FName ContextName)
Activate a new camera, optionally specifying which context it belongs to. If ContextName is valid and that context isn't on the stack yet, it is auto-pushed. If ContextName is NAME_None, the camera activates on the current active context. When switching to a different context, the new context's evaluation tree gets a reference leaf pointing to the previous context's Director for inter-context blending.
ActivateNewCamera¶
AComposableCameraCameraBase * ActivateNewCamera(TSubclassOf< AComposableCameraCameraBase > CameraClass, UComposableCameraTransitionBase * TransitionInstance, const FComposableCameraActivateParams & ActivationParams, FOnCameraFinishConstructed OnPreBeginplayEvent, FName ContextName)
Activate a new camera using a raw transition instance (not wrapped in a DataAsset). Used internally by ActivateNewCameraFromTypeAsset when the type asset provides its own DefaultTransition as an instanced UComposableCameraTransitionBase*.
ActivateNewCameraFromTypeAsset¶
AComposableCameraCameraBase * ActivateNewCameraFromTypeAsset(UComposableCameraTypeAsset * CameraTypeAsset, UComposableCameraTransitionDataAsset * TransitionOverride, const FComposableCameraActivateParams & ActivationParams, const FComposableCameraParameterBlock & Parameters, FName ContextName)
Activate a new camera from a Camera Type Asset (data-driven workflow). Creates a default AComposableCameraCameraBase, duplicates node templates from the type asset, wires the RuntimeDataBlock, and applies caller-provided parameter values.
Parameters
-
CameraTypeAssetThe type asset defining the camera's node composition and parameters. -
TransitionOverrideOptional transition override. If nullptr, uses the type asset's DefaultTransition. -
ActivationParamsStandard activation parameters (transient, lifetime, pose preservation). -
ParametersThe caller-provided parameter block with exposed parameter values. -
ContextNameContext to activate in (NAME_None = current active context).
Returns
The activated camera instance, or nullptr on failure.
ReactivateCurrentCamera¶
AComposableCameraCameraBase * ReactivateCurrentCamera(UComposableCameraTransitionBase * Transition)
ResumeCamera¶
void ResumeCamera(AComposableCameraCameraBase * ResumeCamera, UComposableCameraTransitionBase * Transition, EComposableCameraResumeCameraTransformSchema TransformSchema, FTransform SpecifiedTransform, bool bUseSpecifiedRotation)
GetCameraActions¶
const TSet< UComposableCameraActionBase * > & GetCameraActions()
AddModifier¶
void AddModifier(UComposableCameraNodeModifierDataAsset * ModifierAsset)
RemoveModifier¶
void RemoveModifier(UComposableCameraNodeModifierDataAsset * ModifierAsset)
ApplyModifiers¶
void ApplyModifiers(AComposableCameraCameraBase * Camera, bool bRefreshModifierData)
OnModifierChanged¶
void OnModifierChanged()
AddCameraAction¶
UComposableCameraActionBase * AddCameraAction(TSubclassOf< UComposableCameraActionBase > ActionClass, bool bOnlyForCurrentCamera)
FindCameraAction¶
UComposableCameraActionBase * FindCameraAction(TSubclassOf< UComposableCameraActionBase > ActionClass)
RemoveCameraAction¶
void RemoveCameraAction(UComposableCameraActionBase * Action)
ExpireCameraAction¶
void ExpireCameraAction(TSubclassOf< UComposableCameraActionBase > ActionClass)
BindCameraActionsForNewCamera¶
void BindCameraActionsForNewCamera(AComposableCameraCameraBase * Camera)
PopCameraContext¶
void PopCameraContext(FName ContextName, UComposableCameraTransitionDataAsset * TransitionOverride, const FComposableCameraActivateParams & ActivationParams)
Pop a specific camera context by name. If this is the active context, the previous context resumes with an optional transition. Cannot pop the base context if it is the last one remaining.
Parameters
-
ContextNameThe name identifying which context to pop. -
TransitionOverrideOptional transition. If nullptr, falls back to the resume camera's DefaultTransition. -
ActivationParamsOptional activation params for the resume camera.
TerminateCurrentCamera¶
void TerminateCurrentCamera(UComposableCameraTransitionDataAsset * TransitionOverride, const FComposableCameraActivateParams & ActivationParams)
Terminate the current camera context — pops the active (top) context off the stack. The previous context resumes with an optional transition. Cannot pop the base context. This is the explicit way to end a context. Transient cameras trigger this automatically.
Parameters
-
TransitionOverrideOptional transition. If nullptr, falls back to the resume camera's DefaultTransition. -
ActivationParamsOptional activation params for the resume camera.
GetContextStackDepth¶
const
int32 GetContextStackDepth() const
Get the number of contexts on the stack.
GetActiveContextName¶
const
FName GetActiveContextName() const
Get the name of the currently active (top) context.
GetRunningCamera¶
const inline
inline AComposableCameraCameraBase * GetRunningCamera() const
GetCurrentCameraPose¶
const inline
inline FComposableCameraPose GetCurrentCameraPose() const
ResolveTransition¶
const
UComposableCameraTransitionBase * ResolveTransition(const UComposableCameraTypeAsset * SourceTypeAsset, const UComposableCameraTypeAsset * TargetTypeAsset, UComposableCameraTransitionDataAsset * CallerOverride) const
Resolve which transition to use when switching from one type-asset camera to another. Implements the five-tier resolution chain:
-
CallerOverride (returned directly if non-null)
-
Transition table lookup (exact A→B pair from project settings)
-
Source's ExitTransition (SourceTypeAsset field — "always leave this way")
-
Target's EnterTransition (TargetTypeAsset field — "always enter this way")
-
nullptr (hard cut)
The table (tier 2) performs exact-match only — no wildcards. Per-camera ExitTransition and EnterTransition (tiers ¾) serve as the per-camera fallbacks when no explicit pair is defined in the table.
Parameters
-
SourceTypeAssetThe type asset of the currently-running camera (may be nullptr). -
TargetTypeAssetThe type asset being activated (may be nullptr). -
CallerOverrideExplicit caller transition — if non-null, wins unconditionally.
Returns
The resolved transition instance (owned by the type asset or table entry), or nullptr for a hard cut. Caller must DuplicateObject before mutating.
PrepareResumeCallback¶
FOnCameraFinishConstructed PrepareResumeCallback(AComposableCameraCameraBase * Camera)
Prepare the pending type-asset state for a camera that is being resumed (e.g. after a context pop). If the camera was originally built from a type asset, this restores PendingTypeAsset / PendingParameterBlock and returns a callback bound to OnTypeAssetCameraConstructed. If not a type-asset camera, returns an empty (unbound) delegate.
Called by ContextStack::PopActiveContextInternal so the resumed camera is fully reconstructed from its original type asset instead of producing an empty shell.
Protected Methods¶
| Return | Name | Description |
|---|---|---|
FMinimalViewInfo |
GetCameraViewFromCameraPose const |
|
void |
DoUpdateCamera virtual |
GetCameraViewFromCameraPose¶
const
FMinimalViewInfo GetCameraViewFromCameraPose(const FComposableCameraPose & OutPose) const
DoUpdateCamera¶
virtual
virtual void DoUpdateCamera(float DeltaTime)
Private Attributes¶
| Return | Name | Description |
|---|---|---|
TObjectPtr< UComposableCameraTypeAsset > |
PendingTypeAsset |
|
FComposableCameraParameterBlock |
PendingParameterBlock |
Pending parameter block for the type-asset activation callback. Not a UPROPERTY — plain struct. |
TObjectPtr< UComposableCameraContextStack > |
ContextStack |
|
TObjectPtr< UComposableCameraModifierManager > |
ModifierManager |
|
FMinimalViewInfo |
LastDesiredView |
PendingTypeAsset¶
TObjectPtr< UComposableCameraTypeAsset > PendingTypeAsset
PendingParameterBlock¶
FComposableCameraParameterBlock PendingParameterBlock
Pending parameter block for the type-asset activation callback. Not a UPROPERTY — plain struct.
ContextStack¶
TObjectPtr< UComposableCameraContextStack > ContextStack
ModifierManager¶
TObjectPtr< UComposableCameraModifierManager > ModifierManager
LastDesiredView¶
FMinimalViewInfo LastDesiredView
Private Methods¶
| Return | Name | Description |
|---|---|---|
void |
UpdateActions |
|
void |
BuildModifierDebugString |
|
void |
OnTypeAssetCameraConstructed |
Called by the dynamic delegate during type-asset-based camera activation. |
UpdateActions¶
void UpdateActions(float DeltaTime)
BuildModifierDebugString¶
void BuildModifierDebugString(FDisplayDebugManager & DisplayDebugManager)
OnTypeAssetCameraConstructed¶
void OnTypeAssetCameraConstructed(AComposableCameraCameraBase * Camera)
Called by the dynamic delegate during type-asset-based camera activation.