Change skeletal mesh, blueprint, multiplayer

I am messing with some multiplayer stuff, I have movement replicating so you can see proper animations of another player in game. I have it set up so when they connect it goes right to a team selection then class selection, which determines which skeletal mesh is used. I then ‘SetSkeletalMesh’ with one for class/team they picked.

On side of player, you see it change. But when looking at them in game, from a different client, they do not change, they are default skeletal mesh set up for that character.

Have tried having server run ‘setskeletalmesh’, replicated variable that holds skeletalmesh reference. Not sure what I am missing. Have been through loads of video tutorials and searched endlessly, have found nothing out there… as if ‘it should just work’… but it doesn’t.

Hi arbopa,

Unfortunately, this is a known bug with UE4 (UE-16478). Right now, Set Static Mesh and Set Skeletal Mesh, and possibly other component values, do not replicate their changes. For now, you’ll need to create separate Characters and swap between them, rather than swapping Skeletal Mesh in Character. If you make children of that Character and use those, any references should remain intact.

Well thanks for a reply. It is disappointing, but at least it is a reply. How do you swap characters? No idea.

easiest way is to spawn a new Character, use Player Controller to possess it, and then delete old Character. Most people use Spectator Spawn as a default for map to spawn and then perform Spawn/Possess function in Player Controller.

Thanks again. Have searched for info on this, and find nothing of substance. Oh well. Would be nice if they just fixed bug, seeing that 4.10 is supposed to be a ‘bug fix’ update. And it seems this is a relatively important issue that setting meshes replicates properly.

yeah it would be a lot easier if it just works as intended. But is not fixed yet btw in 4.12

Please Epic team fix it if possible :slight_smile:

Hello,

Here is a link to issue on our public tracker so you can keep up with its status: Unreal Engine Issues and Bug Tracker (UE-16478)

Have a great day

is bug (UE4 (UE-16478)) fixed now?

From tracker page “This issue has been closed as ‘Won’t Fix’ due to an extended period of time without updates. If this issue is important to you please let us know by posting on AnswerHub or UDN, and Epic will re-open ticket for further review.”

So after YEARS, they have not bothered to fix a simple bug. SMH.

public tracker has a status of ‘wont fix’. So it appears this is not important enough to be fixed. Which is total BS.

Hey arbopa,

status of ticket on public tracker was due to priority of ticket. This is something that you can work around using method suggested above, which is why it was given a low priority. However, I can go ahead and reopen ticket for investigation based on fact that it’s still occurring in latest engine version.

Thanks for update

This Issue still exists for skeletal meshes and Absolutely need to be fixed Immediately.

I lost 3 weeks trying to find what is going on with my code. Tried everything, read a lot of documentation. It was driving me crazy. It still doesnt work in 4.26

There is an incredibly simple and more preferable solution to this:

  • Replicate a separate ‘Mesh’ variable.
  • Use an OnRep callback to call SetSkeletalMesh on component.

This is considerably cheaper than replicating both mesh component and an internal mesh, especially as USceneComponent contains additional properties which are also replicated by default.

There are also other connotations, if ACharacter classes skeletal mesh component was replicated it will also mess with character movement networking.

3 Likes

Could you elaborate on this, and explain it in a way a replication noob will understand?
This bug is still present in UE5 and is currently a massive roadblock for my project, but I don’t understand your proposed solution.

It’s explained here.