AnimMontage is not worked in SubAnimInstance

I view the code, montage is only work in the AnimInstance which it plays, it’s no worked in sub AnimInstance.

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.