Change the Local Prefab Avatar
In the Realtime Avatar Manager class, how do I change the Local Prefab Avatar at runtime?
2 Replies
Hi @Chesco. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
To change the Local Prefab Avatar at runtime in the RealtimeAvatarManager class, you can modify the
localAvatarPrefab
property from your own scripts. This property represents the avatar prefab that is instantiated to represent the local client.
Here's an example of how you might do this:
In this example, newAvatarPrefab
is the new avatar prefab you want to use. The ChangeAvatar
method changes the localAvatarPrefab
property of the _manager
to the newAvatarPrefab
.
Remember, the new avatar prefab needs to include a RealtimeAvatar
component on the root in order to function correctly.
For more information, you can refer to the RealtimeAvatarManager documentation (https://normcore.io/documentation/realtime/xr/avatars#realtimeavatarmanager).
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@584767573556592640> kapa.ai is still learning and improving, please let us know how it did by reacting below