RealDocs

FMontageSubStepper::GetCurrentSectionIndex

function Engine Since unknown
#include "Animation/AnimMontage.h"
Access: public Specifiers: constinline

Description

Returns the index into the montage's CompositeSections array for the section the sub-stepper currently occupies.

Caveats & Gotchas

  • Returns INDEX_NONE until Initialize() and the first Advance() have populated a valid section — don't call this before stepping has begun.
  • The index is only valid for the montage the sub-stepper was last Initialize()'d with; it is not a stable identifier across different montages.

Signature

int32 GetCurrentSectionIndex() const { return CurrentSectionIndex; }

Return Type

int32

Example

Looking up the active section C++
// Engine-internal usage
int32 SectionIndex = MontageSubStepper.GetCurrentSectionIndex();
if (SectionIndex != INDEX_NONE)
{
	const FCompositeSection& Section = Montage->CompositeSections[SectionIndex];
}

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.