Using Different Avatars for every User

Hi there, I am trying to develop a simple multiplayer VR game using Unity and Oculus. I was able to use the default VR Player (the black sphere with black round hands), along with the lipsynched mouth. It works. I have personalized the avatar, and get the new mesh in game, but all the players get the same Avatar.

How can I store multiple avatars and make it so each user spawns with a different avatar?

I have problems editing Realtime Avatar Manager script, because it snaps back to the way it was. I think it is not modifiable.

If someone has solved this problem before, would be so kind to share what method was used? a piece of code to read through would be optimal, since I am a beginner programmer.

Glad to hear you have it working! If you’d like to switch the avatar per-player, you’ll want to create an avatar prefab by following this guy: XR Avatars and Voice Chat | Normcore.

Then you’ll want to set that prefab in the Local Avatar Prefab slot of the RealtimeAvatarManager component on the client that you would like to use that avatar with. The Local Avatar Prefab represents what avatar prefab should be used to represent the local player on all clients.

Max

Hi Max, thank you so much for your reply.

I already created 4 prefabs (duplicating the default black sphere avatar), then I changed the mesh, and the prefabs are working, but all users had the same avatar.

If I am understanding, what you are suggesting is to:

1- set avatar 1 on the Local avatar prefab (as I did before), then create a build 1, and putting it on the VR Headset 1

2- set avatar 2 on the Local avatar prefab, then create a build 2, and putting it on the VR Headset 2.

And so on…

Am I correct? This would be a good workaround, but only if I will put physically the builds on the headset. I will not be able to publish anything like this I think (not that I am really planning on publishing anything, but maybe putting the game for free test on Sidequest…)

If I have understood wrong, then I don’t know what you mean with “on the client that you would like to use that avatar with”. With client do you mean a build of the game, specifically uploaded on a specific headset, right?

What I head in mind was a list, that would store all prefabs, and then assign them (randomly or in order) to the player, based on the UserID they would get from the server.

Do you also know how to do this?

Meanwhile, I am going to try to implement what I understood from you advice, I think it should work.

Thanks a lot!

Ed