I’m running a dedicated server and one client. From the client, I trigger an animation montage containing an anim notify state on my character to play on both the client and dedicated server. NotifyBegin and NotifyEnd are continually called only on the dedicated server instance for the duration of the montage.
The flow is as follows:
UCharacterMovementComponent:ServerMovePacked
is called on the server when processing network events. This leads toUCharacterMovementComponent::MoveAutonomous
being called followed byUAnimInstance::TriggerAnimNotifies
which triggersNotifyBegin
on the anim notify state.UCharacterMovementComponent::MoveAutonomous
then callsUAnimInstance::ClearQueuedAnimEvents
which clears out the anim instanceNotifyQueue
.USkeletalMeshComponent::FinalizeBoneTransform
is called on the server during an animation update. This leads toUAnimInstance::TriggerAnimNotifies
calling theNotifyEnd()
function of my anim notify state becauseNotifyQueue
was cleared earlier from step 2.
My character isn’t even moving the entire time so I don’t understand why the server is processing the server move. Even if it were moving,NotifyBegin
and NotifyEnd
are still continually called on the server.
Is this always expected behavior on the server? Should I never be playing anim notify states on the server?
EDIT 1: Confirmed this is not an issue in UE 5.5.4. The notifies are played correctly, and UAnimInstance::ClearQueuedAnimEvents
is not present in the code base. Will try to repro in a test project and submit a bug report.
EDIT 2: Already reported in Unreal Engine Issues and Bug Tracker (UE-308913)