UAnimInstance::QueueMontageSectionChangedEvent
#include "Animation/AnimInstance.h"
Access: public
Specifiers: ENGINE_API
Description
Enqueues a montage section-changed event for deferred dispatch after animation evaluation. Used internally when a montage transitions between sections, ensuring delegates fire at a safe point outside the evaluation loop.
Caveats & Gotchas
- • Like other queued montage events, dispatch occurs after the animation update completes — not at the exact moment the section boundary is crossed. If you need frame-precise timing, use anim notifies placed at the section boundary instead.
- • The event is only queued when section changes happen through the standard montage playback path. Manually jumping to a section via Montage_JumpToSection may not trigger this event depending on engine version.
Signature
ENGINE_API void QueueMontageSectionChangedEvent(const FQueuedMontageSectionChangedEvent& MontageSectionChangedEvent); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| MontageSectionChangedEvent | const FQueuedMontageSectionChangedEvent& | The event payload containing the montage whose section changed, the previous section name, the new section name, and the delegate to invoke. | — |
Return Type
void Example
Queue a section change notification C++
void UMyAnimInstance::NotifySectionChanged(UAnimMontage* Montage, FName PrevSection, FName NewSection)
{
FQueuedMontageSectionChangedEvent SectionEvent;
SectionEvent.Montage = Montage;
SectionEvent.PrevSectionName = PrevSection;
SectionEvent.NewSectionName = NewSection;
SectionEvent.OnMontageSectionChanged = OnSectionChangedDelegate;
QueueMontageSectionChangedEvent(SectionEvent);
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?