FMontageSubStepper::Initialize
#include "Animation/AnimMontage.h"
Access: public
Description
Binds the sub-stepper to a montage instance, caching its Montage pointer, resetting per-frame state, and re-evaluating the TimeStretchCurve if one is present.
Caveats & Gotchas
- • Must be called before AddEvaluationTime() or Advance() are called — those methods assume MontageInstance and Montage are already valid.
- • Called once per montage tick from FAnimMontageInstance::Advance(), not once per sub-step; the same FMontageSubStepper is then advanced repeatedly within that tick.
Signature
void Initialize(const struct FAnimMontageInstance& InAnimInstance) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InAnimInstance | const struct FAnimMontageInstance& | The montage instance this sub-stepper will advance time for. | — |
Return Type
void Example
Preparing the sub-stepper for a tick C++
// Engine-internal: FAnimMontageInstance::Advance()
MontageSubStepper.Initialize(*this);
MontageSubStepper.AddEvaluationTime(DeltaTime);
while (MontageSubStepper.HasTimeRemaining())
{
MontageSubStepper.Advance(Position, &BranchingPointMarker);
} Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?