Documentation

​
​

Development

User Acquisition

Monetization

Industry

Vivox Unity SDK

Vivox Unity SDK

Vivox
​
​
Vivox Unity SDK
  • Overview
  • Get started
  • Release notes
  • Developer guide
    • Set up your project
    • Create voice and text channels
      • Channel management
      • Channel name criteria
      • Channel types
      • Positional channels
      • Channel identifiers for large scale games
      • Participant management
      • Join a channel
      • Leave a channel
      • Channel webhooks
      • Automatic connection recovery
    • Messaging
    • Player management
    • Device management
    • Audio management
    • Mobile development
    • Text-to-speech
    • Speech-to-text
    • Real-time recording
    • Server-side-recording
    • Troubleshooting
  • Tutorials
  • Reference
  1. Vivox Unity SDK documentation
  2. Vivox Unity Developer Guide
  3. Channels

Leave a channel

How to remove a player from a Vivox channel and disconnect from communication.
Read time 1 minute
Last updated 8 months ago

To remove a user from a channel, call
VivoxService.Instance.LeaveChannelAsync(string channelName)
with the name of the channel to leave. Alternatively,
VivoxService.Instance.LeaveAllChannelsAsync()
can be used to leave all channels the user is connected to. The disconnected channel object remains in the
VivoxService.Instance.ActiveChannels
list until after the disconnection is successful.
The object is immediately removed from the list if the session is completely disconnected.
Note
Disconnection is not an immediate operation and can take several seconds to complete. A ChannelLeft event will trigger when a disconnection has been completed successfully.
The following code is an example of how to perform this operation:
using UnityEngine;using Unity.Services.Vivox;class VivoxBasicsExample : MonoBehaviour{ . . . void LeaveChannel(string channelNameToLeave) { . . . VivoxService.Instance.LeaveChannelAsync(channelNameToLeave); . . . } . . .}

Copyright © 2026 Unity Technologies
LegalPrivacy PolicyCookiesDocumentation Terms of UseDo Not Sell or Share My Personal InformationYour Privacy Choices (Cookie Settings)

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S and elsewhere (more info here). Other names or brands are trademarks of their respective owners.

Some pages are machine-translated for convenience, and may contain inaccuracies. In the event of conflicting information, the English version is authoritative.


    Report a problem with this page