Vivox Building Block
Add voice chat, text chat, device management, and a participant roster, to your scene.
Read time 6 minutesLast updated 20 days ago
Integrate voice and text chat into your project with this Building Block's pre-made UI elements. Learn what Vivox channels are, how to connect players to them, and how to build chat and roster interfaces from the included components.
Introduction
This Building Block helps you integrate Vivox into your project to connect players with voice and text chat. It can serve as a starting point for communication features in your multiplayer project, or dropped into an existing project to quickly add voice and chat throughout development.
This Building Block demonstrates how to do the following:
- Join a Vivox voice and/or text channel.
- Select and configure audio input and output devices.
- Display a live channel roster with speaking indicators and mute controls.
- Send and receive text chat messages in a channel.
The Building Block includes example scenes, UI Toolkit assets, and runtime components ready to connect players through voice and text.
Prerequisites
Before you start, make sure you meet the following prerequisites:
- Install the Vivox Building Block from the Unity Asset Store.
- Link your Unity Editor project to a cloud project.
- Enable the Vivox service in the Unity Dashboard for your project.
- On the Unity Dashboard, project credentials are available under Products > Vivox Voice and Text > Credentials.
- In the Unity Editor, open the Vivox configuration menu at Services > Vivox > Configure and have your project’s credentials populate the Environment Configuration fields.
- If a Unity project with Vivox credentials is correctly linked to the Editor but the Environment Configuration fields are not populating, entering and exiting Play mode is a secondary way to force credentials to update.
Initial setup
Validate the Building Block is installed correctly by opening the included scene under Assets > Blocks > Vivox > Scenes.
RosterWithVoiceAndText- Click Play to enter Play mode.
- Enter a display name and channel name, then select Join Channel to connect.
- The channel roster now populates, and is able to send and receive text chat messages.
Vivox channels
A Vivox channel is a shared voice and text communication space that players connect to by name. Players who join the same channel name using the same Unity project credentials can hear and chat with each other. Channels are scoped to your project, the same channel name used in a different project creates an entirely separate space with no connection between them.
Channels are lightweight, they don't require a host, dedicated server, or session, making them easy to use in any multiplayer setup.
Channels are independent of gameplay synchronization. They work alongside Netcode for GameObjects, Netcode for Entities, or any other networking solution. A typical connection flow looks like the following:
- Initialize Unity Services.
- Authenticate the player.
- Connect to the game network (for example, using Multiplayer Sessions).
- Join a Vivox channel.
- Load the gameplay scene.
Included resources
Scene | Description |
|---|---|
| A combined view showing the channel join form, a live roster of connected players with speaking indicators and mute controls, and a text chat panel. Configured by default with |
| A standalone audio configuration panel for selecting input and output devices and adjusting their volumes. |
RosterWithVoiceAndText
RosterWithVoiceAndTextThis scene demonstrates the core Vivox features, a live channel roster with speaking indicators and mute controls, and a text chat panel. A basic join form is included to get players into a channel during prototyping or testing. In a shipped game, replace the connection flow with your own.
ChannelRoster- : Displays the name of the currently joined channel.
ChannelName - : Displays the number of participants in the channel.
PlayerCountLabel - : Scrollable list of participants. Each entry shows the player's display name, a speaking indicator that animates when the player is transmitting audio, and a mute toggle. The mute toggle is visible only when the local user is connected to audio.
RosterList - : Displays and copies the current channel name so other players can join.
CopyChannelName
TextChat- : Scrollable history of text messages sent in the channel.
MessageLog - : Text field for composing a message.
MessageInput - : Sends the composed message to the channel.
SendButton
JoinChannelMenu- : Text field for the player's display name.
PlayerName - : Text field for the channel name to join.
ChannelName - : Joins the specified channel, handling Vivox login automatically.
JoinRoom
AudioDeviceSelector
AudioDeviceSelectorAudioDeviceSelector- : Lists available microphone input devices. Selecting one sets it as the active input device.
InputDeviceDropdown - : Adjusts microphone input volume. Uses an audio taper curve for natural-feeling control.
InputVolumeSlider - : Lists available audio output devices. Selecting one sets it as the active output device.
OutputDeviceDropdown - : Adjusts speaker output volume. Uses an audio taper curve for natural-feeling control.
OutputVolumeSlider
Joining with multiple clients locally
Use Multiplayer Play Mode to test with multiple players directly from the Unity Editor.
Troubleshooting
Multiplayer Services not available
Unity Services Core must be initialized before Vivox can function. Add the prefab to your scene for a zero-configuration setup. The prefab includes , , and Vivox initialization in a single GameObject. Alternatively, add and components individually to your own initialization GameObject.
VivoxServiceInitializerServicesInitializationPlayerAuthenticationServicesInitializationPlayerAuthenticationAuthentication failure
Ensure the Editor is signed in and the correct Project ID is set in > Services. Confirm service enablement in the Unity Dashboard under Authentication and Vivox.
Project Settings
?
Can't join a channel
Verify network connectivity. Confirm Vivox is enabled and your project is linked. Check that the player display name and channel name fields are not empty.
Players can't hear or see each other despite joining the same channel name
Confirm that all clients are linked to the same Unity cloud project. Vivox channels are scoped to project credentials, the same channel name in two different projects creates two separate channels with no connection between them.
No audio after joining
Check that the expected input and output devices are selected using the audio device selector. Ensure the application has microphone permission on the target platform.
Mute button not visible for a participant
The mute button is only shown when both the target participant and the local user are connected to audio. If the local user is connected as text-only, mute controls are hidden.
UI not showing channel data
Confirm your root UXML element has the correct ChannelSettings asset set as its Data Source in the UI Builder. Refer to the Configuration section for details.