EasyVivoxUtilities.cs
EasyVivoxUtilities contains Helper/Utility methods that don't require dependencies
All libraries this script depends on
The code below is called a preprocessor directive and is only valid if the build is for Android platform or else the compiler will ignore this code. Read more about it here
Android
RequestAndroidMicPermission()
is used to request microphone access if the destination build is Android
iOS
RequestIOSMicrophoneAccess()
is used to request Microphone access for iOS.
In order to access Microphone on iOS you need to edit Info.plist. Unity provides easy access in the Player Settings. Read more about it here
Filter User/Channel Names
FilterChannelAndUserName
is used to filter out unsupported characters in Usernames and Channel names when using Vivox. This method is used under the hood in EasyCode automatically, but you can call this method yourself
This does not filter out bad words or racial slurs, recommended to implement your own filter or use a 3rd party asset/service such as Language and Profanity Filter (Not Sponsored) or implement your own using this list of bad words courtesy of ShutterStock (Not Sponsored)
This method is automatically implemented for you in the Login()
and JoinChannel()
Methods
This code can probably be optimized for slightly better performance, but it will only be called a few times throughout the lifetime of your game / app. Or you can implement Regex (there is a performance hit with Regex as well, but you don't have to type every character you're trying to filter for. Weigh the costs ⚖️)
Last updated