Hello, Ive a question about server → client rpc.
When I call from the server the SetMesh function on the actor, Its mesh isnt set to something else.
But when I change the function to a multicast it works,
According to the documentation about rpc calls, A client rpc is called by the server and executed on the client.
But why isnt this working then?
.cpp
// public
void APickupItem::SetMesh(UStaticMesh * Mesh)
{
if (HasAuthority()) {
STMeshComp->SetStaticMesh(Mesh);
Client_SetStaticMesh(Mesh);
}
}
// private
void APickupItem::Client_SetStaticMesh_Implementation(UStaticMesh * Mesh)
{
STMeshComp->SetStaticMesh(Mesh);
}