Download

[Networking] Is Per Client custom replication possible? Per actor or per property

To demonstrate my point, imagine we have a class ATeam, which is a replicated actor that represents something like a party.

Players can invite each other to these, but players that are outside of this team should not know that it exists. Players in the party should be able to see who is in the party and some other properties via property replication.

Now to achieve this, I could make the party a non-replicated server side thing and replicate its data to members via RPC’s but that takes the freedom. I read about COND_Custom, yet it is ill-advised to do such checks as the link here states https://docs.unrealengine.com/en-US/…ies/Conditions : You cannot use condition that can change per connection (don’t check RemoteRole here). Now I am not so sure if this would hold true, given the check should be “Members.Contains(Player)” which wouldn’t really change per connection, as it is a server side check that doesn’t have anything to do with the player/connection. Also this can be used to hide the properties of the team, which serves its purpose given players from outside cannot tell who is in there, what is the “secret pass” is, yet still, they know that the team exists because the actor exists, so it does not reply to actor replication, also creates, even though small network load. Hence this is rather a relevancy more than replication, but relevancy has much too little of a control compared to replication.

Can someone put a light on this?

Yeah above is best bet. Bear in mind IsNetRelevantFor() doesn’t work if you’re using replication graph.