Difference between avatar.ownerIDInHierarchy, avatar.ownerIDSelf, and avatar.realtime.clientID?
I'm trying to keep track of the ID of the current client as clients leave and enter the room. I'm finding that avatar.owner.IDSelf always returns -1.
avatar.ownerIDInHierachy seems to work but if someone leaves, and rejoins they get assigned to ID 0 even though the former client that had the ID of 1 also gets set to the ID of 0. This causes errors with my system that isn't expecting two clients to both have the ID of 0.
avatar.realtime.clientID seems to work but never reassigns the ID's when someone leaves. For example if a room has two clients and client 0 leaves. Client 1 remains as ID 1 but once the client that left, rejoins the game. Their ID gets set to 0.
Which ID system should I use for a system that expects unique ID's for each client and can handle clients leaving and joining without assigning duplicate ID's?
avatar.ownerIDInHierachy seems to work but if someone leaves, and rejoins they get assigned to ID 0 even though the former client that had the ID of 1 also gets set to the ID of 0. This causes errors with my system that isn't expecting two clients to both have the ID of 0.
avatar.realtime.clientID seems to work but never reassigns the ID's when someone leaves. For example if a room has two clients and client 0 leaves. Client 1 remains as ID 1 but once the client that left, rejoins the game. Their ID gets set to 0.
Which ID system should I use for a system that expects unique ID's for each client and can handle clients leaving and joining without assigning duplicate ID's?