Setup Your Credentials

Use Vivox Developer Portal or Unity Gaming Services (UGS) Dashboard and create a project to get access to credentials or link your project inside the Unity Editor to be able to access credentials.

In your script that inherits from EasyManager, you must hardcode your credentials. This is used for development purposes.

Vivox recommends not hardcoding your credentials in your application. Read more here

You can implement custom logic to retrieve your credentials at runtime from your game server. You can also use Unity's Remote Config or Cloud Code to get credentials at runtime if you don't have a dedicated game server using Unity's Multiplay, AWS EC2 instance (or other cloud VM instances), or self-hosted home server

Your credentials should be assigned to the variables located inside of the static class EasySession

public class VivoxManager: EasyManager
[SerializeField] string apiEndpoint;
[SerializeField] string domain;
[SerializeField] string issuer;
[SerializeField] string secretKey;

private void Awake()
{
    EasySession.APIEndpoint = new Uri(apiEndpoint);
    EasySession.Domain = domain;
    EasySession.Issuer = issuer;
    EasySession.SecretKey = secretKey;
}

If you are not inheriting from EasyManager and just referencing it using GetComponent<EasyManager>(); you still must hardcode your credentials

using EasyCodeForVivox;
using System;
using UnityEngine;

public class VivoxManager : MonoBehaviour
{
    [SerializeField] string apiEndpoint;
    [SerializeField] string domain;
    [SerializeField] string issuer;
    [SerializeField] string secretKey;

    private void Awake()
    {
        EasySession.APIEndpoint = new Uri(apiEndpoint);
        EasySession.Domain = domain;
        EasySession.Issuer = issuer;
        EasySession.SecretKey = secretKey;
    }
}

Last updated