离开频道
How to remove a player from a Vivox channel and disconnect from communication.
阅读时间1 分钟最后更新于 13 天前
若要从频道中移除用户,请调用
VivoxService.Instance.LeaveChannelAsync(string channelName)VivoxService.Instance.LeaveAllChannelsAsync()VivoxService.Instance.ActiveChannels
以下代码示例说明如何执行此操作:
using UnityEngine;using Unity.Services.Vivox;class VivoxBasicsExample : MonoBehaviour{ . . . void LeaveChannel(string channelNameToLeave) { . . . VivoxService.Instance.LeaveChannelAsync(channelNameToLeave); . . . } . . .}