Do PlayerState variables get replicated automatically?

Hello Dear community,

I am creating my own PlayerState in C++ and I’d like to know if the variables shown in a PlayerState class get replicated automatically or if I have to Implement the GetLifetimeProps stuff.

Best regards,

I don’t think UE will ever replicate custom variable automatically. You probably have to tell it to actually replicate them.
Anyway, for better code readability and understanding you should always explicitly say in code what is and is not replicated in my opinion.

If you ask whether variables that were made by Epic (in APlayerState) are replicated, then the answer is: some of them are (for more, see header of that class here Runtime/Engine/Classes/GameFramework/PlayerState.h).

If you ask whether your custom variables will be replicated automatically, then the answer is: no. In such case you’ll have to make them replicate on your own.