#include <ComposableCameraPatchInstance.h>

Inherits: UObject

Runtime per-Patch state, owned by UComposableCameraPatchManager.

Holds the source asset reference, the Patch evaluator camera actor (Stage 2+), resolved layer / push-sequence for ordering, schedule fields, envelope state, cached parameter block for evaluator (re)construction, and a back-link to the user-facing handle.

Stage 1 note: Evaluator stays nullptr; PatchManager::Apply does not tick anything yet. The envelope state is populated to "Entering, alpha 0" at construction but is not advanced — Stage 3 adds AdvanceEnvelope. All bookkeeping fields are valid as soon as AddPatch returns so debug HUD / introspection work end-to-end.

Public Attributes

Return Name Description
TWeakObjectPtr< UComposableCameraPatchTypeAsset > SourcePatchAsset Source patch asset. Weak — the asset can outlive any single runtime instance.
TObjectPtr< AComposableCameraCameraBase > Evaluator The Patch's own camera-actor evaluator. Stage 2+: spawned by AddPatch via UE::ComposableCameras::ConstructCameraFromTypeAsset. Stage 1: always nullptr.
int32 LayerIndex Effective composition order. Resolved from the asset default and the per-AddPatch override (Params.bOverrideLayerIndex true → use Params.LayerIndex).
int32 PushSequence Monotonic insertion sequence — tiebreaker for equal LayerIndex. Older first.
uint8 ExpirationType Bitmask of EComposableCameraPatchExpirationType channels that may fire.
float Duration
bool bExpireOnCameraChange
float EnterDuration
float ExitDuration
EComposableCameraPatchEase EaseType
EComposableCameraPatchPhase Phase
float ElapsedInPhase Time spent in the current Phase. Reset to 0 on every phase transition.
float ElapsedTimeActive Cumulative time spent in the Active phase (used by the Duration channel).
float CurrentAlpha
float ExitStartAlpha The CurrentAlpha at the moment Phase flipped to Exiting. The exit ramp scales the eased curve by this value so a Patch retired mid-Entering fades out from wherever it had reached, instead of popping to 1 first. Stays at 1 by default for the common case (Active → Exiting transition).
FComposableCameraParameterBlock CachedParameters Cached parameter block from AddPatch. Used by Stage 2's ConstructCameraFromTypeAsset call and any future re-construction (e.g. in response to modifier changes).
TWeakObjectPtr< AComposableCameraCameraBase > RunningCameraAtAdd RunningCamera observed on the owning Director at AddPatch time. When bExpireOnCameraChange is true, the schedule check compares this against the Director's current RunningCamera each frame and flips the Patch to Exiting if they differ (per-patch tracking — a Patch born during camera A never treats its own birth as a "change").
TWeakObjectPtr< UComposableCameraPatchHandle > Handle Back-link to the user-facing handle. Weak — the handle can be released by the caller while the instance is still alive (the instance keeps running until expiration; the caller has just opted out of further handle queries).

SourcePatchAsset

TWeakObjectPtr< UComposableCameraPatchTypeAsset > SourcePatchAsset

Source patch asset. Weak — the asset can outlive any single runtime instance.


Evaluator

TObjectPtr< AComposableCameraCameraBase > Evaluator

The Patch's own camera-actor evaluator. Stage 2+: spawned by AddPatch via UE::ComposableCameras::ConstructCameraFromTypeAsset. Stage 1: always nullptr.


LayerIndex

int32 LayerIndex = 0

Effective composition order. Resolved from the asset default and the per-AddPatch override (Params.bOverrideLayerIndex true → use Params.LayerIndex).


PushSequence

int32 PushSequence = 0

Monotonic insertion sequence — tiebreaker for equal LayerIndex. Older first.


ExpirationType

uint8 ExpirationType = 0

Bitmask of EComposableCameraPatchExpirationType channels that may fire.


Duration

float Duration = 0.f

bExpireOnCameraChange

bool bExpireOnCameraChange = false

EnterDuration

float EnterDuration = 0.f

ExitDuration

float ExitDuration = 0.f

EaseType

EComposableCameraPatchEase EaseType = 

Phase

EComposableCameraPatchPhase Phase = 

ElapsedInPhase

float ElapsedInPhase = 0.f

Time spent in the current Phase. Reset to 0 on every phase transition.


ElapsedTimeActive

float ElapsedTimeActive = 0.f

Cumulative time spent in the Active phase (used by the Duration channel).


CurrentAlpha

float CurrentAlpha = 0.f

ExitStartAlpha

float ExitStartAlpha = 1.f

The CurrentAlpha at the moment Phase flipped to Exiting. The exit ramp scales the eased curve by this value so a Patch retired mid-Entering fades out from wherever it had reached, instead of popping to 1 first. Stays at 1 by default for the common case (Active → Exiting transition).


CachedParameters

FComposableCameraParameterBlock CachedParameters

Cached parameter block from AddPatch. Used by Stage 2's ConstructCameraFromTypeAsset call and any future re-construction (e.g. in response to modifier changes).


RunningCameraAtAdd

TWeakObjectPtr< AComposableCameraCameraBase > RunningCameraAtAdd

RunningCamera observed on the owning Director at AddPatch time. When bExpireOnCameraChange is true, the schedule check compares this against the Director's current RunningCamera each frame and flips the Patch to Exiting if they differ (per-patch tracking — a Patch born during camera A never treats its own birth as a "change").


Handle

TWeakObjectPtr< UComposableCameraPatchHandle > Handle

Back-link to the user-facing handle. Weak — the handle can be released by the caller while the instance is still alive (the instance keeps running until expiration; the caller has just opted out of further handle queries).