Multiplayer Mesh-Properties Desync

Premise

I remember seeing a video on this that was using one of the examples in networking explaining this concept before but for the life of me I can’t find it any more. It had to do something with replication range / relevance etc.

Basically the problem is very simple in nature and I’m looking for an answer to:

"How to best approach / fix problem of desyncing of visual mesh things in Multiplayer? Think of things like visibility or changing the static mesh and object uses that happen on server and are then multicast to clients."


Example:

There are 3 players (2 are online and standing next to eachother, 1 is offline).

I have an object which in this case is a Blueberry bush (which is placed in the editor thus owned by nobody technically). When PLAYER1 interacts with it (he temporarily becomes the owner of it on the server so the RPC calls can happen),and the bush gives him items (blueberries) and the MESH is set to hidden (and MULTICAST) to all other players, I also set a separate var on the object to set it to ‘respawn’ - to basically show the mesh again later after some time expires and to prevent further interaction by other players.

PLAYER2 sees this happen because they are online and in range and everything is OK and works as intended.

PLAYER3 however was not online when multicast was sent out, so if he comes online after the interaction happens he sees the object in the original state still (he however correctly CAN NOT interact with it because it is on cooldown, just the visual is wrong.)


Query

What is best way to ‘sync’ PLAYER3 to real visual state? I guess iterating through all objects on player login and setting the visual state is one way but that doesn’t seem very practical or clean way of doing it. Is there a better / cleaner way of doing this?

OK, found the relevant video I spoke about : 4 Network Relevancy RUS Subs - YouTube

Will try to implement this in the way described in the video (adding separate OnRep_ variable to see if this would fix the issue.)

Ok this worked, I’ve moved the ‘visual aspects’ - changing of the mesh OR hiding of the mesh into a OnRep Notify function which then properly replicated it to logging in player (or player that was outside of the relevance range as suggested in the video.)

UPROPERTY(ReplicatedUsing = OnRep_SetIsRespawning, BlueprintReadWrite, Category = "Setup|Gameplay|Resource", EditInstanceOnly) bool bIsRespawning = false;