AnimMontage is not worked in SubAnimInstance

Hi, zhong jian bin

It says in JIRA UE41144 that “this is by design, as they can be swapped at runtime”, but in fact, I don’t understand it clearly.

As my understand from the code implementation, montage can be played by subAnimInstance.

  1. Get the SubAnimInstance pointer by USkeletalMeshComponent::GetSubInstanceByName.

  2. Call Montage_Play from SubAnimInstance.

But there is a small bug if the Montage has root motion and played in SubAnimInstance, Character will not be moved by the root motion montage。

I try to fix it as below.

263493-rootmotionplayingmodify.png