Are the avatars in avatar manager stored in any particular order?
Are the avatars in avatar manager stored in any particular order?
3 Replies
Hi @Mechabit. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the knowledge sources provided, the avatars in the avatar manager are not stored in any particular order. The Realtime > Xr > Avatars documentation mentions that the RealtimeAvatarManager keeps track of all avatars in the room using a dictionary:
"RealtimeAvatarManager keeps track of all avatars in the room via the
localAvatar
and avatars
properties. The latter is a dictionary of all RealtimeAvatar
components stored under the clientID
that the avatar belongs to."
Dictionaries in programming typically do not maintain a specific order for their elements. Additionally, the Room > Collections documentation describes RealtimeSet, which is used for unordered collections:
"RealtimeSet is an unordered collection of RealtimeModels. Models can be added and removed at runtime by any clients, simultaneously, and without conflict."
While the avatar manager specifically uses a dictionary, this information about RealtimeSet further supports the notion that Normcore generally doesn't emphasize order in its collections when it's not necessary.
Therefore, it's safe to conclude that the avatars in the avatar manager are not stored in any particular order.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@162940911964258305> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
This is correct. The only collection they’re stored in is a dictionary where the key is the client ID