I would like to implement a "search player by name" functionality to my game. I've unfortunately already enabled the "allow non-unique display names" option from my title's title settings, so providing display name to Client API GetAccountInfo will not work. I would also prefer not to require players to link their account via email/username/password (via Client API AddUsernamePassword) in order to do it.
I am thinking it may be possible to workaround this issue by creating a unique group for each player, where the player is the only member of the group, and the player's display name then gets set to the group's unique name. So when players search for another player, the group with that name is found first, and then the player is retrieved simply by getting the single member of that group. This would effectively result in the same behavior as having "allow non-unique display names" disabled.
Is there any reason why this approach wouldn't work in practice, or any pitfalls I may not be accounting for? I know doing so this way will trigger additional API calls to retrieve the player with the searched name, because the group will have to be retrieved before the matching player can be found, however I don't plan to be using this for anything other than searching for players.
Thanks a lot in advance for any insight!
,I would like to implement a "search player by name" functionality to my game. I've unfortunately already enabled the "allow non-unique display names" option from my title's title settings, so providing display name to Client API GetAccountInfo will not work. I would also prefer not to require players to link their account via email/username/password via Client API AddUsernamePassword in order to do it.
I am thinking it may be possible to workaround this issue by creating a unique group for each player, where the player is the only member of the group, and the player's display name then gets set to the group's unique name. So when players search for another player, the group with that name is found first, and then the player is retrieved simply by getting the single member of that group. This would effectively result in the same behavior as having "allow non-unique display names" disabled.
Is there any reason why this approach wouldn't work in practice, or any pitfalls I may not be accounting for? I know doing so this way will trigger additional API calls to retrieve the player with the searched name, because the group will have to be retrieved before the desired player is retrieved, however I don't plan to be using this for anything other than searching for players.
Thanks a lot in advance for any insight!