# Replication (DOREPLIFETIME)

**URL:** <https://forums.unrealengine.com/t/replication-doreplifetime/296248>\
**Category:** Multiplayer & Networking\
**Tags:** Networking, Replication, unreal-engine, question\
**Created:** [October 15, 2014, 6:50pm UTC](https://forums.unrealengine.com/t/replication-doreplifetime/296248 "2014-10-15T18:50:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![envenger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@envenger](https://forums.unrealengine.com/u/envenger)\
**Post date:** [October 15, 2014, 6:50pm UTC](https://forums.unrealengine.com/t/replication-doreplifetime/296248/1 "2014-10-15T18:50:27Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![eXi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/exi/32/906583_2.png) [@eXi](https://forums.unrealengine.com/u/eXi)\
**Post date:** [October 15, 2014, 7:34pm UTC](https://forums.unrealengine.com/t/replication-doreplifetime/296248/2 "2014-10-15T19:34:59Z")

</div>

Have you looked into this Wikisite?

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

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.

---

<div class="post-metadata">

**Author:** ![envenger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@envenger](https://forums.unrealengine.com/u/envenger)\
**Post date:** [October 16, 2014, 5:39pm UTC](https://forums.unrealengine.com/t/replication-doreplifetime/296248/3 "2014-10-16T17:39:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![envenger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@envenger](https://forums.unrealengine.com/u/envenger)\
**Post date:** [October 16, 2014, 6:27pm UTC](https://forums.unrealengine.com/t/replication-doreplifetime/296248/4 "2014-10-16T18:27:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![eXi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/exi/32/906583_2.png) [@eXi](https://forums.unrealengine.com/u/eXi)\
**Post date:** [October 16, 2014, 6:44pm UTC](https://forums.unrealengine.com/t/replication-doreplifetime/296248/5 "2014-10-16T18:44:34Z")

</div>

Found something for you i guess:

> **[Network Tips and Tricks in Unreal Engine 4](https://www.unrealengine.com/en-US/blog/network-tips-and-tricks)**
>
> I wanted to talk about a few tips that are good to know about when dealing with replicated properties in native code. The full explanation of how to replicate a property is somewhat out of the scope of this article, but I can quickly go over the...

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

CONDITIONAL PROPERTY REPLICATION

(:

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_49a519741](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_49a519741](https://forums.unrealengine.com/u/anonymous_user_49a519741)\
**Post date:** [December 1, 2016, 11:57pm UTC](https://forums.unrealengine.com/t/replication-doreplifetime/296248/6 "2016-12-01T23:57:24Z")

</div>

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](https://forums.unrealengine.com/showthread.php?1690-New-blog-post-Network-Tips-and-Tricks)
