ChangeNetWork.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using LGS.Common_20200526;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5. using XRTool.Util;
  6. public class ChangeNetWork : MonoBehaviour
  7. {
  8. void Start()
  9. {
  10. NetStatus.Instant.RegisterNetWorkChangeCallBack(NetWorkChange);
  11. }
  12. void Update()
  13. {
  14. //Debug.Log(CommonMethod.IsReceive + "AAAA");
  15. //textMesh.text = NetStatus.Instant.SCGetNetWorkInfo();
  16. }
  17. private void NetWorkChange(NetworkReachability preNetWorkStatus, NetworkReachability internetReachability)
  18. {
  19. //registerText.text = "网络状态变化时触发===》"+internetReachability.ToString();
  20. switch (internetReachability)
  21. {
  22. case NetworkReachability.NotReachable:
  23. //ViewManager.Intance.ShowPop(1);
  24. break;
  25. case NetworkReachability.ReachableViaCarrierDataNetwork:
  26. break;
  27. case NetworkReachability.ReachableViaLocalAreaNetwork:
  28. //ViewManager.Intance.ShowPop(1);
  29. break;
  30. }
  31. }
  32. }