Always replicate specific property regardless of NetRelevancy

Similar to this question: https://forums.unrealengine.com/deve…-cull-distance
I’m wondering what is the best way to ensure that a specific property will replicate no matter what - even if the actor is outside of the net cull distance. I need to ensure that this replication happens asap, so neither a multicast nor a RepNotify will get the job done, and enabling AlwaysRelevant will eliminate my ability to use net cull distance for other, less crucial properties. Has the answer changed much since 2015, or is the only solution still to store the “replicate no matter what” property in a separate object set to AlwaysRelevant, and then have that object pass the information on to the Player when received? If that remains the only/best solution, are there any tips for implementing it cleanly/efficiently?

Relevancy is implemented at the actor level, not the property level. If an object is outside of NetRelevancy range you will never get property updates for it, there is no way around that - actors are completely destroyed on the client shortly after they are no longer relevant, so as far as the client is concerned the actor doesn’t exist at all.

If you need a property to be always relevant, it should belong to an always-relevant actor. There are some existing places you can keep it, like the PlayerState or a GameState (both of which are always-relevant actors) if you don’t want to spawn a proxy actor. Dedicating a whole actor to one property is probably overkill (and more costly, certainly for a single property), so an existing actor is probably best.

EDIT: Lol at that thread from a less-experienced me…

Thanks for the advice! GameMode and GameState being always-relevant for this very purpose was the crucial bit of info I was missing. Restructured my code a bit and moved the replicated property into GameState and it worked like a charm both within and outside of the player’s net cull distance.
As an aside - it’s great to see you giving back to the community on this very same topic nearly half a decade later :slight_smile:

Is there a way to get a call in a blueprint when an actor enters or exits net cull distance ?, some “items” don’t “reappear” back so to speak and making a bool condition to set bAlwaysRelevant attached to a timer might do the “trick” for me. Cheers !

Well BeginPlay would be called for example - since it’s a brand new actor. There are no BP events, but in C++ you can use PostNetInit or something if you specifically want a network call.

while it “might” do the trick, it sounds pretty questionable. Ultimately, what are you trying to achieve?

Sorry for late reply, Thanks ! ,Event Begin Play is called when becoming relevant again, i had issue with some components that required attach call again. Would you consider necessary in a multiplayer environment to add force net update and flush net dormancy calls in begin play or does the engine do that when coming out of net cull and its not needed ?