Change Skeletal Mesh For all the Users of a multiplayer session (Server and clients) in begin play

Hello guys i have a question to ask. I am Working on a multiplayer app and we want to let the users to Create and Choose their avatars. So we use the ReadyPlayerMe Plugin (Unreal Engine SDK - Ready Player Me – Developer Documentation). The users create their avatar in the “Entry Level” and then they can download it inside the game via the Url that the RPM give to him and set it as skeletal mesh to their pawn.
So we create this events inside the players Pawn with a RepNotify Variable “OnRep_AvatarURL”


And then OnRep_AvatarURL we call the LoadAvatarClient event

And finaly on Pawns Begin Play we have this add this bp:

For proof of concept we add different Url for the Players that test it.
The problem is that for the player that Creates a Multiplayer Session (so he is the Server) this isn’t working but for the players that join that session it works fine and we can see their avatars.
Can anyone tell as what are we doing wrong? Thanks for your time

Your On_Rep function is blocking the server (host client) from loading the skeletal mesh.

1 Like

Ok, so what i must change? It is not necessary to use RepNotify variable? Or i must add something more?

Servers run OnRep functions when the onrep value changes.
Multicast logic is executed by servers along with clients.

So you should pass the url to the server, then Multicast → set url and stop logic there. Let the OnRep function execute Load New Avatar cleanly. No checks for server, No switch has auth etc.

Something like…

Pawn class: Get Url (Do Not Set It) → RPC server (URL)
Server: Multicast → Set Avatar URL

OnRep_Avatar_URL: Load New Avatar


First of all thanks for your time. So you purpose something like that? Sorry but i am not so experienced in Unreal and i am using only BPs

First pic looks solid.

Second pic should be:

Load Avatar Server → Multicast (url)
Load Avatar Client → Set Avatar URL