How to get current animation of a character in C++?

I have tried to look, but could not find anything. Thanks for the help.

For Montages:

UAnimMontage *Montage = MyAnimInstance->GetCurrentActiveMontage();

For animation sequences in general, I believe there’s no easy way. The anim graph and anim states together can have any number of sequences being blended into a final pose to different degrees (eg, there could be 10 different animations being blended in, some 0%, some 10%, some 50%, etc). “What animation is playing?” is a very ambiguous question at that point. “Give me a list of all playing sequences” is more reasonable but I don’t believe that has an easy answer either. When adding a sequence to the mix, the sequence tracks get added, not the sequence per-se. I don’t think references to the sequences that originated the track pools survive to the end of the process.

You can get info about what’s happening in a particular state machine:

MyAnimInstance->GetRelevantAnimTimeRemainingFraction
MyAnimInstance->GetRelevantAnimLength

FAnimNode_AssetPlayerBase* AssetPlayer = MyAnimInstance->GetRelevantAssetPlayerFromState(MachineIndex, StateIndex);
AssetPlayer->GetAnimAsset()->GetAllAnimationSequencesReferred()

If I’m mistaken, I would love to hear about it :slight_smile: