SkinnedMeshRenderer Replication

Hello,

I’m working on a project that uses the hybrid animation replication approach that used in Unity’s Netcode sample. I’m trying to implement a way to replicate changes made to a SkinnedMeshRenderer at runtime.

Do you have any examples or suggestions on how to achieve this or any simple steps?

Thank you.

What changes in particular?

I’d like to implement character customization using a SkinnedMeshRenderer. My goal is to replicate changes made to the meshes and materials of the SkinnedMeshRenderer across networked clients.

You mean, what kind of head, body, leg mesh the player uses? And in addition, things like attachments eg beards, capes, pouches and such?

Neither of these should use any of the built-in network features. You basically need to set up a list of selectable items per each slot (head, neck, shoulder, etc) as a scriptable object so that you have an index for each. And then you make a call like this:

ChangeAvatarAttachmentRpc(byte attachmentSlot, byte attachmentIndex)

Or use network variables to support late-joining clients.

1 Like

Thank you for your comprehensive response. Using network variables will ensure that late-joining clients can receive the correct character customization data and see the other players’ characters accurately.