Skip to content

UExperimentLoggerComponent

Base actor component that collects per-frame experiment state during demo playback.

Syntax

class UExperimentLoggerComponent : public UActorComponent

Remarks

Attach this component (or a subclass) to the spectator controller. The spectator calls LogFrame() each tick to record the current state of all registered agents and the subject's player state into the experiment log buffer.

Subclass this component to add experiment-specific data to each log frame. UCLASS

Inheritance Hierarchy

UActorComponent → UExperimentLoggerComponent

Methods

Method Signature Description Blueprint
LogFrame void UExperimentLoggerComponent::LogFrame() Captures the current per-frame experiment state and appends it to the spectator controller's log buffer.
SetParentController void UExperimentLoggerComponent::SetParentController(AExperimentSpectatorController *parent) Sets the owning spectator controller so this component can query its state.
UExperimentLoggerComponent UExperimentLoggerComponent::UExperimentLoggerComponent() Constructs the component.

Properties

Property Type Description Blueprint
playerState AExperimentSubjectState * The subject's replicated player state, resolved lazily from the spectator controller.
spectatorController AExperimentSpectatorController * The spectator controller that owns and drives this logger component.