Login / Logout
Inherit from EasyManager.cs
using EasyCodeForVivox;
public class VivoxManager : EasyManager
{
}
Inject EasyLogin
using EasyCodeForVivox;
using UnityEngine;
using Zenject;
public class VivoxLogin : MonoBehaviour
{
private EasyLogin _login;
[Inject]
private void Initialize(EasyLogin login)
{
_login = login;
}
}
Login
Logs into Vivox if the username is valid
Although I use the term "userName" throughout EasyCode docs, you can think of "userName" as the Player Id and Display Name as the player's gamer tag
Sets the transmission mode to All so any Voice or Text chat automatically switches to a new channel whenever a channel is joined or switched.
There is an additional parameter that allows the player to joined as muted. This is useful for conference type settings like zoom chat where Admins/Moderators controls who can speak.
EasyManager
public void Login()
{
LoginToVivox("username", displayName: "gamerTag");
}
public void LoginAsMuted()
{
LoginToVivox("username", displayName: "gamerTag", joinMuted: true);
}
EasyLogin
public void Login()
{
_login.LoginToVivox("username", displayName: "gamerTag");
}
public void LoginAsMuted()
{
_login.LoginToVivox("username", displayName: "gamerTag", joinMuted: true);
}
Logout
Logs player out of Vivox.
EasyManager
public void Logout()
{
LogoutOfVivox("username");
}
EasyLogin
public void Logout()
{
_login.LogoutOfVivox("username");
}
Last updated
Was this helpful?