Download

Multiplayer - how to replicate Set Static Mesh on mesh component?

I’ve a blueprint with a mesh and I would like to chose random meshes in begin play. Everything is working correctly on Server but on Client the mesh isn’t changing - it’s always the default one.

Random number is replicating without a problem. Anyone know how to change mesh and let know everyone to change them as well?

One solution would be to put all possible static meshes in an array, and everyone would have this array. Then you have a ReplicateWithNotify for the index of the mesh the static mesh is using. Then in the OnRep_MeshIndex, you Get from the array at MeshIndex the Static Mesh you’d like, and assign it to the Static Mesh component of your blueprint.

Thanks a lot! It’s working!