# Is is possible to replicate a UObject in c++ ?

**URL:** <https://forums.unrealengine.com/t/is-is-possible-to-replicate-a-uobject-in-c/60710>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [April 10, 2016, 10:51am UTC](https://forums.unrealengine.com/t/is-is-possible-to-replicate-a-uobject-in-c/60710 "2016-04-10T10:51:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gunschlinger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gunschlinger](https://forums.unrealengine.com/u/Gunschlinger)\
**Post date:** [April 10, 2016, 10:51am UTC](https://forums.unrealengine.com/t/is-is-possible-to-replicate-a-uobject-in-c/60710/1 "2016-04-10T10:51:07Z")

</div>

Hi! I want to replicate a UObject in c++ for my Status Effects. I searched online and found nothing. What would be the best way to replicate the Status Effect object in c++ ?

---

<div class="post-metadata">

**Author:** ![gedamial](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gedamial](https://forums.unrealengine.com/u/gedamial)\
**Post date:** [April 10, 2016, 3:50pm UTC](https://forums.unrealengine.com/t/is-is-possible-to-replicate-a-uobject-in-c/60710/2 "2016-04-10T15:50:31Z")

</div>

> [@Gunschlinger;509942](#):
>
> Hi! I want to replicate a UObject in c++ for my Status Effects. I searched online and found nothing. What would be the best way to replicate the Status Effect object in c++ ?

At the beginning I used UObjects to represent weapons. But I changed that class to an Actor-derived class because **UObject doesn’t have support for Networking**.

---

<div class="post-metadata">

**Author:** ![Gunschlinger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gunschlinger](https://forums.unrealengine.com/u/Gunschlinger)\
**Post date:** [April 10, 2016, 3:55pm UTC](https://forums.unrealengine.com/t/is-is-possible-to-replicate-a-uobject-in-c/60710/3 "2016-04-10T15:55:10Z")

</div>

> [@gedamial;510049](#):
>
> At the beginning I used UObjects to represent weapons. But I changed that class to an Actor-derived class because **UObject doesn’t have support for Networking**.

I could make the status effects Actor based and handle them like my weapons. But i dont know how exspensive creating and destroying of actors would be.

---

<div class="post-metadata">

**Author:** ![Jackblue](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jackblue/32/88706_2.png) [@Jackblue](https://forums.unrealengine.com/u/Jackblue)\
**Post date:** [April 11, 2016, 6:10am UTC](https://forums.unrealengine.com/t/is-is-possible-to-replicate-a-uobject-in-c/60710/4 "2016-04-11T06:10:57Z")

</div>

Yes, you can replicate an UObject but you need an actor to handle the replication, but in your case it’s not a problem, you can easily use your Character or your PlayerState or a Component to store your StatusEffects.

Here, you can find how to do this:

> **[Replicating TArrays crashes game](https://forums.unrealengine.com/showthread.php?59275-Replicating-TArrays-crashes-game&p=231425#post231425)**
>
> I created an ActorComponent “MyActorComponent” with an Array of UObjects “UMyObject” that need to be replicated. I overrode the IsSupportedForNetworking and the GetLifetimeRepProperties on the UObject. (this is part psuedo code) class MyUObject :...

I hope this help you ! 🙂
