Set Static Mesh not updating the static mesh parameter of Static Mesh Component on the client

Hi guys,

I have two variables, both replicated, on my actor called DisplayMesh, which is of type Static Mesh and DisplayMeshComponent, which is a Static Mesh Component. I have been following (and expanding) on the UsableActor Inventory tutorials by Tom Looman.

So it is the inventory system, where I have placed three of the actors with a rock mesh as the DisplayMesh in the level. The construction script makes sure that the static mesh value of DisplayMesh is set as the Static Mesh of the DisplayMeshComponent. I have a DropItem function, being called on the Server, which re-spawns the object I had taken from the game world. This is where the screw up starts.

My problem is specifically the DisplayMeshComponent. The Static Mesh parameter simply won’t update on the client, when I spawn a new instance of my actor. Have a look:

The server is fine…the highlighted item is updating properly to the rock model.

But on the client, I am getting the mesh that was assigned to the DisplayMesh variable by default.

The DisplayMesh variable is defined with EditAnywhere, BlueprintReadWrite, Replicated specifiers
The DisplayMeshComponent variable is defined with EditDefaultsOnly, BlueprintReadWrite, Replicated specifiers

Could someone clue me into what’s going on here??


Ok so I figured this one out after putting on my thinking cap…I changed the DisplayMesh property from Replicated to RepNotify and everything worked like a charm!