API_Module_Device.cs 994 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. 
  2. using SC.XR.Unity.Module_Device;
  3. using System;
  4. using System.Collections;
  5. using System.Collections.Generic;
  6. using UnityEngine;
  7. public class API_Module_Device {
  8. public static DeviceBase Current {
  9. get {
  10. return Module_Device.getInstance.Current;
  11. }
  12. }
  13. public static AndroidDevice CurrentAndroid {
  14. get {
  15. return Module_Device.getInstance.CurrentAndroid;
  16. }
  17. }
  18. public static bool IsOurGlass {
  19. get {
  20. if (CurrentAndroid != null) {
  21. return CurrentAndroid.type == AndroidDeviceType.Other ? false : true;
  22. }
  23. return false;
  24. }
  25. }
  26. public static bool IsPhoneDevice {
  27. get {
  28. if (!Application.isEditor) {
  29. if (Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.Android) {
  30. return true;
  31. }
  32. }
  33. return false;
  34. }
  35. }
  36. }