Skip to content

Instantly share code, notes, and snippets.

@digitallysavvy
Last active July 15, 2019 21:26
Show Gist options
  • Save digitallysavvy/c9ad879c3b72871d4c1920a69286e7f8 to your computer and use it in GitHub Desktop.
Save digitallysavvy/c9ad879c3b72871d4c1920a69286e7f8 to your computer and use it in GitHub Desktop.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using agora_gaming_rtc;
public class LeaveHandler : MonoBehaviour
{
// Start is called before the first frame update
void OnEnable()
{
// Agora.io Implimentation
IRtcEngine mRtcEngine = IRtcEngine.GetEngine(AgoraInterface.appId); // Get a reference to the Engine
if (mRtcEngine != null)
{
Debug.Log("Leaving Channel");
mRtcEngine.LeaveChannel();// leave the channel
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment