AgoraGameObject.cs 465 B

1234567891011121314151617181920
  1. #if UNITY_EDITOR_WIN || UNITY_EDITOR_OSX || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_IOS || UNITY_ANDROID
  2. using UnityEngine;
  3. using System.Collections;
  4. namespace Agora.Rtc
  5. {
  6. public class AgoraGameObject : MonoBehaviour
  7. {
  8. void OnApplicationQuit()
  9. {
  10. IRtcEngine rtcEngine = RtcEngine.Get();
  11. if (rtcEngine != null)
  12. {
  13. rtcEngine.Dispose();
  14. }
  15. }
  16. }
  17. }
  18. #endif