I am replicating my character across servers, and all of the required properties of my character. These are of various types - UActorComponent and USphereComponent for example. They all replicate perfectly, just as expected.
The animation component is a custom class, derived from UAnimInstance. This is the only property on the character that is NULL when checked for on the clients.
My setup in the header is as follows:
// Player animations
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Replicated, Category = Character)
UCharacterAnimator* Animator;
And in the implementation class, it is included in the list of replicated properties:
void ARoguelikeCharacter::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
DOREPLIFETIME(ARoguelikeCharacter, Details);
DOREPLIFETIME(ARoguelikeCharacter, Health);
DOREPLIFETIME(ARoguelikeCharacter, States);
DOREPLIFETIME(ARoguelikeCharacter, ClassData);
DOREPLIFETIME(ARoguelikeCharacter, Statistics);
DOREPLIFETIME(ARoguelikeCharacter, Skills);
DOREPLIFETIME(ARoguelikeCharacter, Equipment);
DOREPLIFETIME(ARoguelikeCharacter, Animator);
DOREPLIFETIME(ARoguelikeCharacter, VisionSphere);
DOREPLIFETIME(ARoguelikeCharacter, RecentlyStruck);
DOREPLIFETIME(ARoguelikeCharacter, IsRolling);
DOREPLIFETIME(ARoguelikeCharacter, Stunned);
DOREPLIFETIME(ARoguelikeCharacter, IsInCombat);
}
Everything is replicated, save for this object.
For further clarity, in the constructor of my animation object I am setting bReplicates to true, and all of the properties have the Replicates tag.
Is there any way to replicate a UAnimInstance object? I use it to play animations based on state changes in the character class.
If this is not possible, what alternatives might I have?