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:
And in the implementation class, it is included in the list of replicated properties:
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?
A pattern I have had success with in the past is to have the AnimaitionBlueprint read variables off it's owner in UpdateAnimation.
In that way, you only need to replicate the owing pawn state.
answered May 16 '17 at 09:48 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here