Animation is not playing

I try to play an animation on a character using C++. I want to play the animation once, then return to idle animation. What I’ve done so far:

  1. used the character from the NavMesh- sample in the first-person c++ template
  2. created a montage using the jumpstart animation
  3. loaded the montage successfully

I tried 3 different approaches to actually start the animation:

Mesh->PlayAnimation();

This works, but returns to the idle pose (I would expect it to go to the idle animation automatically) and does not give me any information how long the animation will take.

float playTime= Character->PlayAnimMontage();

This gives the right playTime, but does nothing.

float playTime= AnimInst->Montage_Play();
This gives the right playTime, but does nothing.

Thank you!

ok, found a solution, kind of.
I didn’t notice that the character from the NavMesh- sample comes with animation-BP, Anim-Graph and all that stuff. Setting animation using Character->PlayAnimMontage(); or AnimInst->Montage_Play(); sets the animation, but that is overwritten in the Anim-BP next Tick().
Mesh->PlayAnimation(); seems to somehow overwrite the anim-BP somehow.

please mark this question as solved.