UAnimInstance::PlaySlotAnimationAsDynamicMontage_WithBlendArgs
#include "Animation/AnimInstance.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Variant of PlaySlotAnimationAsDynamicMontage that accepts FAlphaBlendArgs structs for blend-in and blend-out, allowing custom easing curves instead of linear blends.
Caveats & Gotchas
- • FAlphaBlendArgs lets you specify an EAlphaBlendOption curve (e.g. Cubic) — mismatching curves between in and out can produce visually jarring transitions if not carefully tuned.
- • Like the base overload, only one asset per SlotGroup is allowed; a second call replaces the first.
Signature
ENGINE_API UAnimMontage* PlaySlotAnimationAsDynamicMontage_WithBlendArgs(UAnimSequenceBase* Asset, FName SlotNodeName, const FAlphaBlendArgs& BlendIn, const FAlphaBlendArgs& BlendOut, 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. | — |
| BlendIn | const FAlphaBlendArgs& | Full alpha blend arguments for the blend-in phase, including curve type and time. | — |
| BlendOut | const FAlphaBlendArgs& | Full alpha blend arguments 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 cubic ease-in/ease-out blend C++
FAlphaBlendArgs BlendIn(0.15f);
BlendIn.BlendOption = EAlphaBlendOption::Cubic;
FAlphaBlendArgs BlendOut(0.3f);
BlendOut.BlendOption = EAlphaBlendOption::Cubic;
AnimInstance->PlaySlotAnimationAsDynamicMontage_WithBlendArgs(
DeathAnim, FName("FullBodySlot"), BlendIn, BlendOut); See Also
Tags
Version History
Introduced in: 5.1
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?