SetReplicates called on non-initialized actor

After I had some trouble with late joining players not seeing updated positions of static meshes with physics in the level, I found, that changing the static mesh actors to blueprint and setting replication within the Construction script solves that problem.

Things are working fine, but I get warnings for all those actors

SetReplicates called on non-initialized actor NNNN. Directly setting bReplicates is the correct procedure for pre-init actors

Unfortunately, bReplicates variable can only be read in blueprint, there’s no set functionality. I tried SetIsReplicated on the mesh component, but this does not work consistently and fails quite often. I did not find any other settings, that could be changed.

So I think, i will keep use of SetReplicates . Anyone with similar experience? Sure, these are just warnings, and things work, but I’m still concerned about this…

1 Like

Having the same weird warning.
I notice the warning start appearing on the 4.26 (before that there is no warning).

Is there a new way to set Replicate in C++ that we are not aware?

Just change SetReplicates(true); to bReplicates = true; in the constructor.

1 Like