AndroidArchitecture.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. namespace XGame.Editor.Build
  2. {
  3. /// <summary>
  4. /// Android CPU architecture.
  5. /// 位操作
  6. /// </summary>
  7. public enum AndroidArchitecture
  8. {
  9. None = 0,
  10. /// <summary>
  11. /// 32-bit ARM architecture.
  12. /// </summary>
  13. ARMv7 = 1,
  14. /// <summary>
  15. /// 64-bit ARM architecture.
  16. /// </summary>
  17. ARM64 = 2,
  18. #if UNITY_2020_OR_NEWER
  19. /// <summary>
  20. /// 32-bit Intel architecture.
  21. /// Unity_2020及以上
  22. /// </summary>
  23. X86 = 4,
  24. /// <summary>
  25. /// 64-bit Intel architecture.
  26. /// </summary>
  27. X86_64 = 8,
  28. /// <summary>
  29. /// All architectures.
  30. /// </summary>
  31. All = ARMv7 | ARM64 | X86 | X86_64,
  32. #else
  33. /// <summary>
  34. /// All architectures.
  35. /// </summary>
  36. All = ARMv7 | ARM64,
  37. #endif
  38. }
  39. public static class AndroidArchitectureExt
  40. {
  41. public static UnityEditor.AndroidArchitecture ToUnityImpl(this AndroidArchitecture architecture)
  42. {
  43. if (architecture == AndroidArchitecture.All)
  44. {
  45. return UnityEditor.AndroidArchitecture.All;
  46. }
  47. return (UnityEditor.AndroidArchitecture)architecture;
  48. }
  49. }
  50. }