从游戏注销
Sign players in to Vivox with custom identifiers.
阅读时间1 分钟最后更新于 3 天前
当游戏不再希望用户登录时,它会调用
VivoxService.Instance.LogoutAsync
以下代码示例说明了注销过程:
为了处理连接问题导致的注销,游戏必须处理事件using UnityEngine;using Unity.Services.Vivox;class LogoutExample : MonoBehaviour{ void LogOut() { VivoxService.Instance.LogoutAsync(); }}
VivoxService.Instance.LoggedOutVivoxService.Instance.LoggedOutusing UnityEngine;using Unity.Services.Vivox;using System.Components;class SessionPropChangeExample : MonoBehaviour{ VivoxService.Instance.LoggedOut += onVivoxLoggedOut; private void onVivoxLoggedOut() { //Vivox has logged out, and clean up should be done }}