Add vrcPlayerApi.getPlayerByDisplayName (string displayName) method
DrBlackRat
Issue:
Currently Udon offers no way to get a VRCPlayerApi by the display name of a player.
If you do need to get a VRCPlayerApi by display name you currently need to get an array that contains all players and iterate over it until you find them. This isn't great as doing so is quite expensive in Udon.
Suggestion:
Add a
VRCPlayerAPI.GetPlayerByDisplayName(string displayName)
method, to allow us to quickly get someone's VRCPlayerApi through their display name.This would make working with whitelists etc. a lot easier as those usually store display names.
Log In
Frenetic Furryǃ
should probably just be like ``
GetPlayersByDisplayName
`` and return a array of everyone with that DisplayName as if it only returns 1 instance then there would be issues like: x hacker joins a instance and changes their displayname to x or in a local build and test only 1 instance would recv the whitelist and in alot of cases of testing whitelists you'd want them both to get whitelisted instead of just the 1afaik (at least currently) it is best to just handle whitelisting yourself locally like "is my displayname x if so then whitelist" and if its needed to be synced send a request to sync it