# Push Model Networking

**URL:** <https://forums.unrealengine.com/t/push-model-networking/510684>\
**Category:** Multiplayer & Networking\
**Tags:** unreal-engine, CPP, UE4-27\
**Created:** [March 29, 2022, 5:09pm UTC](https://forums.unrealengine.com/t/push-model-networking/510684 "2022-03-29T17:09:09Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_0c5e0a0b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0c5e0a0b](https://forums.unrealengine.com/u/anonymous_user_0c5e0a0b)\
**Post date:** [March 29, 2022, 5:09pm UTC](https://forums.unrealengine.com/t/push-model-networking/510684/1 "2022-03-29T17:09:09Z")

</div>

I’ve been doing some testing with push model networking and I’m facing possible issues.

My code is as follows:

void ABTBS\_ProjectileBase::GetLifetimeReplicatedProps(TArray& OutLifetimeProps) const  
{  
Super::GetLifetimeReplicatedProps(OutLifetimeProps);

```
FDoRepLifetimeParams Params;
Params.bIsPushBased = true;
DOREPLIFETIME_WITH_PARAMS_FAST(ABTBS_ProjectileBase, TrailParticle, Params);

```

}

void ABTBS\_ProjectileBase::SetTrailParticle(UParticleSystem\* Particle)  
{  
MARK\_PROPERTY\_DIRTY\_FROM\_NAME(ABTBS\_ProjectileBase, TrailParticle, this);  
TrailParticle = Particle;  
ParticleSystem-\>SetTemplate(TrailParticle);  
}

and of course the associated variable is marked as ReplicatedUsing.

Now, I assumed (possibly incorrectly) that if a variable was set to push model then is should only replicate to the client if marked as dirty. However, the opposite appears to be true. It seems to be acting like a completely normal variable and replicating as soon as it changes regardless of whether its marked dirty or not.

I’ve read every thread and article I can find on the matter including ([🎰 🍲 😅 Unreal Engine 4. New network model: PushModel 👩🏻‍⚖️ 🔅 👐🏽](https://tech-en.netlify.app/articles/en539604/index.html))

Is this the intended behaviour? That marking something as dirty doesn’t control overall replication but only speeds us the checking phase of what needs to be replicated? If that’s true is there a way of checking that its actually using push model?

PS: I’ve tried reading the source and reverse engineering what’s happening but its a bit to obfuscated for me to figure out.

Thanks!

---

<div class="post-metadata">

**Author:** ![Jambax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambax/32/904177_2.png) [@Jambax](https://forums.unrealengine.com/u/Jambax)\
**Post date:** [April 6, 2022, 11:06pm UTC](https://forums.unrealengine.com/t/push-model-networking/510684/2 "2022-04-06T23:06:39Z")

</div>

All PushModel really does is say “don’t compare this property until I say so”. It’s really more of a server-side optimisations to avoid expensive property comparisons - the savings are minimal at best.

Worth noting though that all parameters are initially considered “dirty”, so it will send at least once (if it differs from the CDO’s default value)

---

<div class="post-metadata">

**Author:** ![KaidoomDev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kaidoomdev/32/977996_2.png) [@KaidoomDev](https://forums.unrealengine.com/u/KaidoomDev)\
**Post date:** [May 4, 2022, 12:08am UTC](https://forums.unrealengine.com/t/push-model-networking/510684/3 "2022-05-04T00:08:06Z")

</div>

I’ve done a similar test and the value keeps replicating several times without being marked dirty, any ideas ?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0c5e0a0b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0c5e0a0b](https://forums.unrealengine.com/u/anonymous_user_0c5e0a0b)\
**Post date:** [May 4, 2022, 1:11am UTC](https://forums.unrealengine.com/t/push-model-networking/510684/4 "2022-05-04T01:11:02Z")

</div>

I couldn’t find a solution. I asked on Facebook and Reddit and one person replied on Reddit that they faced the same issue as me.

---

<div class="post-metadata">

**Author:** ![KaidoomDev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kaidoomdev/32/977996_2.png) [@KaidoomDev](https://forums.unrealengine.com/u/KaidoomDev)\
**Post date:** [May 4, 2022, 1:29am UTC](https://forums.unrealengine.com/t/push-model-networking/510684/5 "2022-05-04T01:29:51Z")

</div>

Thanks for the update, could it be something that only works on packaged ? I’ll keep looking if I find something I’ll rely.

Cheers.

---

<div class="post-metadata">

**Author:** ![KaidoomDev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kaidoomdev/32/977996_2.png) [@KaidoomDev](https://forums.unrealengine.com/u/KaidoomDev)\
**Post date:** [May 4, 2022, 1:59am UTC](https://forums.unrealengine.com/t/push-model-networking/510684/6 "2022-05-04T01:59:20Z")

</div>

If you type in the console Net.IsPushModelEnabled this will return false, there’s also this macro IS\_PUSH\_MODEL\_ENABLED() also returns false at runtime, so you have to enable push model if I have to guess ?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0c5e0a0b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0c5e0a0b](https://forums.unrealengine.com/u/anonymous_user_0c5e0a0b)\
**Post date:** [May 4, 2022, 3:44am UTC](https://forums.unrealengine.com/t/push-model-networking/510684/7 "2022-05-04T03:44:39Z")

</div>

I remember updating the .ini file to enable push mode but I didn’t know about those console commands / macros. I’ll explore more. Thanks!

---

<div class="post-metadata">

**Author:** ![KaidoomDev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kaidoomdev/32/977996_2.png) [@KaidoomDev](https://forums.unrealengine.com/u/KaidoomDev)\
**Post date:** [May 4, 2022, 2:52pm UTC](https://forums.unrealengine.com/t/push-model-networking/510684/8 "2022-05-04T14:52:41Z")

</div>

Interesting, do you remember what you had to add to the ini ?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0c5e0a0b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0c5e0a0b](https://forums.unrealengine.com/u/anonymous_user_0c5e0a0b)\
**Post date:** [May 6, 2022, 12:20am UTC](https://forums.unrealengine.com/t/push-model-networking/510684/9 "2022-05-06T00:20:03Z")

</div>

I added this (haven’t had a chance to test what you’ve stated yet):  
[SystemSettings]  
net.IsPushModelEnabled=1  
PS: This was in DefaultEngine.ini

---

<div class="post-metadata">

**Author:** ![KaidoomDev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kaidoomdev/32/977996_2.png) [@KaidoomDev](https://forums.unrealengine.com/u/KaidoomDev)\
**Post date:** [May 6, 2022, 12:36am UTC](https://forums.unrealengine.com/t/push-model-networking/510684/10 "2022-05-06T00:36:45Z")

</div>

Oh wow with that setting it actually worked now, this is great thanks for sharing that. I run two tests and it seems to be working as intended with that enabled.

I tested with a simple int32

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/4/f/34f850bc5423ec62f1833e35e6e27ab633e34c40.png)

I set a random number, mark the property dirty and it replicates, also print if push mode is enabled, this time it printed true.

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/3/2/232a569583e99aa9db0566c238e461b8e40cd33e.png)

The most important thing is it doesn’t replicate if not marked dirty which works. If you have issues getting this to work let me know and I’ll do my best to help.

Cheers.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0c5e0a0b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0c5e0a0b](https://forums.unrealengine.com/u/anonymous_user_0c5e0a0b)\
**Post date:** [May 8, 2022, 2:16am UTC](https://forums.unrealengine.com/t/push-model-networking/510684/12 "2022-05-08T02:16:16Z")

</div>

Ok, seems to be working for me now too! Only difference I was in UE 4.27 before and now I’m in UE 5.0. I don’t know if that was an issue or not but for future readers of this thread I can confirm it’s working in 5.0

---

<div class="post-metadata">

**Author:** ![JesseHumphry](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jessehumphry/32/1215657_2.png) [@JesseHumphry](https://forums.unrealengine.com/u/JesseHumphry)\
**Post date:** [November 18, 2022, 2:17am UTC](https://forums.unrealengine.com/t/push-model-networking/510684/13 "2022-11-18T02:17:31Z")

</div>

> [@anonymous\_user\_0c5e0a0b](#):
>
> [SystemSettings]  
> net.IsPushModelEnabled=1

Can additionally say that this is what made it all come together.

The advantage here is that you can neglect to enable the pushmodel and replication will still technically work, just not in the way you’re trying to design it. Enabling PushModel just gives it the behavior you’re intending.

---

<div class="post-metadata">

**Author:** ![RotemSSA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RotemSSA](https://forums.unrealengine.com/u/RotemSSA)\
**Post date:** [March 14, 2023, 6:13pm UTC](https://forums.unrealengine.com/t/push-model-networking/510684/14 "2023-03-14T18:13:36Z")

</div>

Has anyone been able to use this in a packaged game without recompiling the engine? It seems that the engine only defines WITH\_PUSH\_MODEL 1 for editor builds.

---

<div class="post-metadata">

**Author:** ![duova](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@duova](https://forums.unrealengine.com/u/duova)\
**Post date:** [August 17, 2023, 4:51am UTC](https://forums.unrealengine.com/t/push-model-networking/510684/15 "2023-08-17T04:51:18Z")

</div>

In the .Target.cs file you need to add bWithPushModel = true to the server target.  
I tested that this works (assuming you’ve done the params thing and set net.IsPushModelEnabled) on a 5.1.1 source build of the engine, on a dedicated server.
