Replication (DOREPLIFETIME)

Hi, I started going through the replication system today. I am using C++ so there is not much documentation or guides on c++ sadly.

I was going through the the shooter example codes. I found some macros used like

DOREPLIFETIME_ACTIVE_OVERRIDE
DOREPLIFETIME_CONDITION
DOREPLIFETIME

What are their functions and what do they do exactly?

I also found functions called GetLifetimeReplicatedProps and PreReplication in the shooter class.

What are their uses?

Are there any in depth replication documentation or guides for c++ out?

Have you looked into this Wikisite?

At the bottom there are c++ examples.

I know that you asked for the meaning the the functions (i can’t help there), but i don’t know if you have problems using the system at all. So i hope this site helps you.

Seen it but it don’t exactly mention what the DOREPLIFETIME and similar function does and why is it written inside GetLifetimeReplicatedProps function.

As far as I know having UPROPERTY(Replicated) alone replicates the variable. So why are the extra things needed?

I went through the file UnrealNetwork.h

Where those macros are declared but I there is no definition on what they exactly do and how they work.

Found something for you i guess:

The macro is for more controll. It’s a condition. Just read the part at

CONDITIONAL PROPERTY REPLICATION

(:

I found a thread that covers this. It begins with the blog post that eXi provided in their comment. The thread covers a bit more, however, including the ‘override’ version of the macros.

https://forums.unrealengine.com/showthread.php?1690-New-blog-post-Network-Tips-and-Tricks