Replication of the Object Reference through RepNotify

Hello,

I have a variable of type Object Reference. It is set to Replicate through RepNotify.
image

During OnRep I simply print string that says "replicated.
image

Then, from the Server I set the variable to something else.

Why clients are not being replicated about variable change?
image

In order to replicate a reference the referenced class “BP Weapon” needs to be able to replicate by itself.
UObjects can’t be set to replicate in Blueprint however AActor or UActorComponent can.

your OnRep is probably running fine, it just has nothing to point at. a plain blueprint object is a UObject and the net driver cannot spawn one on a client, so what arrives is null and OnRep dont see a change from the null it already had.

so the reference variable replicates, the referenced object does not. GarnerP57 said the same thing from the other side, the referenced class has to be able to replicate by itself, and out of the box only actors and actor components can.

if it has to stay a plain object then something has to host it as a replicated subobject, and in stock ue that registration is c++ only. blueprint object replication from fab is a UObject replication plugin for that gap, you subclass one base object, mark the variable replicated and a component hosts it on any actor, ue5.0 to 5.8, no c++.

i also suggest you check Blueprint Object Replication — Replicate UObjects in Blueprint, Iris Ready | Fab it will help too