Easy Code For Vivox
  • Introduction
    • Official Links
    • Getting Started
      • Wheres The Code
      • Setup EasyCode in My Project
    • Setup Demo Scenes
      • Vivox Developer Portal
      • Unity Gaming Services (UGS) Dashboard
    • Things To Consider
    • FAQ
  • Development Info
    • Design Decisions
    • Release Notes
      • v2.0
      • v1.3
      • v1.2
      • v1.1
      • Template
    • Not Supported
  • Easy Code For Vivox
    • How do I setup EasyCode?
      • Setup Your Credentials
    • How do I do this in EasyCode?
      • Login / Logout
        • Login Properties
        • SetTransmissionMode
        • Login Events
      • Join / Leave Channel
        • Audio Channel
          • Audio Channel Events
        • Text Channel
          • Text Channel Events
        • Channel Events
      • Send Messages
        • Message Events
      • Mute / Unmute
        • Mute / Unmute Events
      • Subscribe to User Events
      • Volume / Audio Settings
        • Audio Device Events
      • Text To Speech ( TTS )
        • TTS Events
    • Vivox Access Tokens
      • Unity Cloud Code
    • Supported Vivox Events
      • Callback Methods
    • Folder Structure / Info
      • / Demo Scenes /
      • / Documentation /
      • / Examples /
      • / Plugins /
      • / Resources /
      • / Scripts /
      • / Settings /
    • Common Errors
  • API Info
    • EasySession.cs
    • EasyManager.cs
      • Main Methods
      • Vivox Event Callbacks
    • Easy3DPositional.cs
    • EasyVivoxUtilities.cs
    • EasySettings.cs
    • Extension Methods
      • EasySIPExtensions.cs
      • GameObjectExtensions.cs
      • TTSMessageExtensions.cs
      • UIExtensions.cs
      • VivoxExtensions.cs
      • EasyDebug.cs
    • EasyEvents.cs
  • Dependency Injection
    • Zenject vs Extenject
    • Install Dependencies
    • Inject Classes
  • Dynamic Events
    • Dynamic Events
    • Tests
    • Gotchas
    • Dynamic Async Events
      • Dont Do
    • Event Examples
  • Related Info
    • How do I do this in Vivox?
      • Conference Chat
    • Pre-Processor Directives
    • How to set iOS Info.plist for Unity?
    • Unity Gaming Services
  • The Future
    • Roadmap
    • Todo / Notes / Changelog
Powered by GitBook
On this page

Was this helpful?

  1. Easy Code For Vivox
  2. How do I setup EasyCode?

Setup Your Credentials

PreviousHow do I setup EasyCode?NextHow do I do this in EasyCode?

Last updated 2 years ago

Was this helpful?

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.

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;
    }
}
Read more here