OutdatedKnownStaticMeshDetected caused by the order of RepNotifies between UStaticMeshComponent vs Actor and other components

Hi,

This is a known issue with the static mesh property’s OnRep: Unreal Engine Issues and Bug Tracker (UE\-156362)

The original report’s problem was caused by the ordering of OnRep_ReplicatedMovment and OnRep_StaticMesh, but I’ve added your info here to the internal tracker for the issue.

I can’t provide an estimate as to when that bug may be fixed, and in the meanwhile, I’m unfortunately not sure there’s a straightforward way to guard against this ordering issue.

One option could be to move the SetMaterial call from an OnRep to PostRepNotifies, which is called after all of the object’s rep notify functions. However, this may not help in the case where the replicated property is on a different object than the static mesh property.

You could set the static mesh component as non-replicated and instead have both the mesh and material replication driven through separate properties, giving better control over when the actual static mesh and material are set on the client. If you need other properties on the static mesh component to be replicated, you could maybe create a derived class and override the component’s GetLifetimeReplicatedProps function to mark the static mesh property as not replicated.

Another option could be to move this functionality to a RPC, rather than handling it through property replication.

Thanks,

Alex