UAnimInstance::PlaySlotAnimationAsDynamicMontage_WithBlendSettings
#include "Animation/AnimInstance.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Variant of PlaySlotAnimationAsDynamicMontage that uses FMontageBlendSettings for both blend phases, providing the most complete control including sync-group-aware blending.
Caveats & Gotchas
- • FMontageBlendSettings supersedes FAlphaBlendArgs as of UE 5.3 and supports additional blend modes including sync-group-based blending; prefer this over the WithBlendArgs variant for new code.
- • Passing mismatched BlendProfile assets in BlendInSettings and BlendOutSettings may produce inconsistent per-bone weighting.
Signature
ENGINE_API UAnimMontage* PlaySlotAnimationAsDynamicMontage_WithBlendSettings(UAnimSequenceBase* Asset, FName SlotNodeName, const FMontageBlendSettings& BlendInSettings, const FMontageBlendSettings& BlendOutSettings, float InPlayRate = 1.f, int32 LoopCount = 1, float BlendOutTriggerTime = -1.f, float InTimeToStartMontageAt = 0.f); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Asset | UAnimSequenceBase* | The animation sequence or blend space to play. | — |
| SlotNodeName | FName | Name of the slot node in the anim graph. | — |
| BlendInSettings | const FMontageBlendSettings& | Full montage blend settings for the blend-in phase. | — |
| BlendOutSettings | const FMontageBlendSettings& | Full montage blend settings for the blend-out phase. | — |
| InPlayRate | float | Playback speed multiplier. | 1.f |
| LoopCount | int32 | Number of times to loop. | 1 |
| BlendOutTriggerTime | float | Time before end at which blend-out begins; -1 uses default. | -1.f |
| InTimeToStartMontageAt | float | Start position in seconds. | 0.f |
Return Type
UAnimMontage* Example
Play with full montage blend settings C++
FMontageBlendSettings BlendIn;
BlendIn.Blend.BlendTime = 0.2f;
BlendIn.Blend.BlendOption = EAlphaBlendOption::HermiteCubic;
FMontageBlendSettings BlendOut;
BlendOut.Blend.BlendTime = 0.35f;
BlendOut.Blend.BlendOption = EAlphaBlendOption::HermiteCubic;
AnimInstance->PlaySlotAnimationAsDynamicMontage_WithBlendSettings(
HitReactAnim, FName("UpperBodySlot"), BlendIn, BlendOut); See Also
Tags
Version History
Introduced in: 5.3
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?