#include <ComposableCameraPlayerCameraManager.h>

Inherits: APlayerCameraManager

Public Attributes

Return Name Description
bool bSyncToControlRotation
FName CurrentContext
AComposableCameraCameraBase * RunningCamera
FComposableCameraPose CurrentCameraPose
TSet< UComposableCameraActionBase * > CameraActions
FOnCameraFinishConstructed CurrentOnPreBeginplayEvent

bSyncToControlRotation

bool bSyncToControlRotation { 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
const UComposableCameraContextStack * GetContextStack const inline Read-only access to the Tier-1 context stack. Intended for debug tooling (FComposableCameraDebugPanel, editor inspectors, tests). Gameplay code should go through the PCM's ActivateCamera / Pop* methods — do not mutate the stack through this pointer.
const UComposableCameraModifierManager * GetModifierManager const inline Read-only access to the modifier manager. Intended for debug tooling (FComposableCameraDebugPanel's Modifier region). Gameplay code should go through AddModifier / RemoveModifier on the PCM, which also triggers reactivation on change.
void GetPoseHistory const Copy the per-frame pose history ring into OutHistory, oldest entry first. The PCM captures one entry per DoUpdateCamera tick after the current-frame pose is finalized; capacity caps at PoseHistoryCapacity frames (~2 s at 60 fps).
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

  • CameraTypeAsset The type asset defining the camera's node composition and parameters.

  • TransitionOverride Optional transition override. If nullptr, uses the type asset's DefaultTransition.

  • ActivationParams Standard activation parameters (transient, lifetime, pose preservation).

  • Parameters The caller-provided parameter block with exposed parameter values.

  • ContextName Context 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

  • ContextName The name identifying which context to pop.

  • TransitionOverride Optional transition. If nullptr, falls back to the resume camera's DefaultTransition.

  • ActivationParams Optional 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

  • TransitionOverride Optional transition. If nullptr, falls back to the resume camera's DefaultTransition.

  • ActivationParams Optional 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

GetContextStack

const inline

inline const UComposableCameraContextStack * GetContextStack() const

Read-only access to the Tier-1 context stack. Intended for debug tooling (FComposableCameraDebugPanel, editor inspectors, tests). Gameplay code should go through the PCM's ActivateCamera / Pop* methods — do not mutate the stack through this pointer.


GetModifierManager

const inline

inline const UComposableCameraModifierManager * GetModifierManager() const

Read-only access to the modifier manager. Intended for debug tooling (FComposableCameraDebugPanel's Modifier region). Gameplay code should go through AddModifier / RemoveModifier on the PCM, which also triggers reactivation on change.


GetPoseHistory

const

void GetPoseHistory(TArray< FComposableCameraPoseHistoryEntry > & OutHistory) const

Copy the per-frame pose history ring into OutHistory, oldest entry first. The PCM captures one entry per DoUpdateCamera tick after the current-frame pose is finalized; capacity caps at PoseHistoryCapacity frames (~2 s at 60 fps).

Debug-only consumer: the Pose History panel reads this every frame to render sparklines and hover tooltips. Not exposed to Blueprint — gameplay code should not depend on it.

In shipping builds this is a no-op returning an empty array (the ring itself is #if !UE_BUILD_SHIPPING). The signature is kept in all configurations so panel code can call it unconditionally without per-config #if guards at every call site.


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:

  1. CallerOverride (returned directly if non-null)

  2. Transition table lookup (exact A→B pair from project settings)

  3. Source's ExitTransition (SourceTypeAsset field — "always leave this way")

  4. Target's EnterTransition (TargetTypeAsset field — "always enter this way")

  5. 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

  • SourceTypeAsset The type asset of the currently-running camera (may be nullptr).

  • TargetTypeAsset The type asset being activated (may be nullptr).

  • CallerOverride Explicit 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.

Public Static Attributes

Return Name Description
constexpr int32 PoseHistoryCapacity static Fixed ring-buffer capacity. 120 frames ≈ 2 seconds at 60 fps, which is enough to catch the "what happened half a second ago?" class of debug questions without blowing memory. Per-entry footprint is ~48 bytes so total is ~6 KB per PCM.

PoseHistoryCapacity

static

constexpr int32 PoseHistoryCapacity = 120

Fixed ring-buffer capacity. 120 frames ≈ 2 seconds at 60 fps, which is enough to catch the "what happened half a second ago?" class of debug questions without blowing memory. Per-entry footprint is ~48 bytes so total is ~6 KB per PCM.

Public Static Methods

Return Name Description
void AddReferencedObjects static
bool IsPoseHistoryFrozen static Whether the pose-history ring buffer is currently frozen (driven by CCS.Debug.Panel.PoseHistory.Freeze). Read-only accessor for the debug panel so it can render a [FROZEN] indicator in the title bar without having to duplicate the CVar declaration. Debug-only; not declared outside !UE_BUILD_SHIPPING.

AddReferencedObjects

static

static void AddReferencedObjects(UObject * InThis, FReferenceCollector & Collector)

IsPoseHistoryFrozen

static

static bool IsPoseHistoryFrozen()

Whether the pose-history ring buffer is currently frozen (driven by CCS.Debug.Panel.PoseHistory.Freeze). Read-only accessor for the debug panel so it can render a [FROZEN] indicator in the title bar without having to duplicate the CVar declaration. Debug-only; not declared outside !UE_BUILD_SHIPPING.

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
bool bIsImplicitlyActivating Guard against re-entrant SetViewTarget calls during implicit activation. When the PCM calls ActivateNewCamera internally, the Director may call Super::SetViewTarget as part of its bookkeeping — the guard prevents that from recursing back into implicit activation.
TArray< FComposableCameraPoseHistoryEntry > PoseHistoryRing
int32 PoseHistoryHead
int32 PoseHistoryCountUsed

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

bIsImplicitlyActivating

bool bIsImplicitlyActivating { false }

Guard against re-entrant SetViewTarget calls during implicit activation. When the PCM calls ActivateNewCamera internally, the Director may call Super::SetViewTarget as part of its bookkeeping — the guard prevents that from recursing back into implicit activation.


PoseHistoryRing

TArray< FComposableCameraPoseHistoryEntry > PoseHistoryRing

PoseHistoryHead

int32 PoseHistoryHead = 0

PoseHistoryCountUsed

int32 PoseHistoryCountUsed = 0

Private Methods

Return Name Description
void UpdateActions
void BuildModifierDebugString
void OnTypeAssetCameraConstructed Called by the dynamic delegate during type-asset-based camera activation.
void CaptureCurrentFrameToPoseHistory Capture one frame into the ring. Called from DoUpdateCamera after CurrentCameraPose is finalized.

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.


CaptureCurrentFrameToPoseHistory

void CaptureCurrentFrameToPoseHistory()

Capture one frame into the ring. Called from DoUpdateCamera after CurrentCameraPose is finalized.