API_Module_NetStatus.cs 974 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using SC.XR.Unity;
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using UnityEngine;
  6. public class API_Module_NetStatus
  7. {
  8. public static bool IsConnect()
  9. {
  10. return NetStatus.Instance.SCIsConnectWifi();
  11. }
  12. public static string GetNetSpeedValue()
  13. {
  14. return NetStatus.Instance.SCGetNetSpeed();
  15. }
  16. public static WIFISTREGTH GetNetStrength()
  17. {
  18. return NetStatus.Instance.SCGetWifiStrength();
  19. }
  20. public static string GetNetStatus()
  21. {
  22. return NetStatus.Instance.SCGetNetStatus();
  23. }
  24. public static string GetNetIPAddress()
  25. {
  26. return NetStatus.Instance.SCGetIP();
  27. }
  28. public static string GetMacAddress()
  29. {
  30. return NetStatus.Instance.SCGetMacAddress();
  31. }
  32. public static void SetCallBack(Action<NetworkReachability, NetworkReachability> NetWorkChange)
  33. {
  34. NetStatus.Instance.RegisterNetWorkChangeCallBack(NetWorkChange);
  35. }
  36. }