|
Kanda Foundation 0.8.0
|
The Kanda SDK integrates voice chat functionality using the Unity Vivox service. This feature is available through the IVoiceService interface.
Voice chat is enabled in all projects by default but will require a Unity Cloud connected project with Vivox enabled to function. To connect please see the Vivox documentation.
If you would like to disable voice chat, you can do so by setting the "Use Voice Chat" option to false in Edit > Project Settings > Kanda SDK > Connection Settings.
The VoiceService provides two types of voice chat:
JoinChannel method to enable group voice chat, where all participants can communicate without positional context.JoinPositionalChannel method for positional voice chat, where audio is spatially adjusted based on the player's in-game location.When using positional voice chat, it is essential to continuously synchronize the player’s head position with the voice service. This is managed through the Set3DPosition method, which ensures that the 3D audio environment reflects the player’s movements in real-time.
Here is a typical lifecycle of the VoiceService for positional voice chat:
VoiceService is initialized to prepare for voice chat.JoinPositionalChannel method, enabling positional audio.Set3DPosition method, allowing for accurate 3D spatial audio.By default, this voice service does not require authentication. However, it is possible to configure OpenID Connect (OIDC) authentication for enhanced security.
To enable authentication, follow the steps outlined in the Unity Services Authentication page.
Vivox as of November 2024 does not support changing the transport for the voice chat. The transport per default is UDP, and as a result some network setups, especially those in corporate environments, may block the voice chat. In such cases the voice chat will not work.
For more information about Vivox networking requirements, see Unity's Vivox documentation.
Should voice chat still be a requirement for the project, and the devices are required to be on the corporate network, then alternatively the project can use a different voice chat provider that supports Secure Websockets (WSS).
Services which support WSS include: