BuildTargetExt.cs 702 B

12345678910111213141516171819202122232425
  1. using UnityEditor;
  2. namespace XGame.Editor.Build
  3. {
  4. internal static class BuildTargetExt
  5. {
  6. public static BuildTargetGroup ToTargetGroup(this BuildTarget target)
  7. {
  8. BuildTargetGroup targetGroup;
  9. switch (target)
  10. {
  11. case BuildTarget.Android:
  12. targetGroup = BuildTargetGroup.Android;
  13. break;
  14. case BuildTarget.iOS:
  15. targetGroup = BuildTargetGroup.iOS;
  16. break;
  17. default:
  18. targetGroup = BuildTargetGroup.Standalone;
  19. break;
  20. }
  21. return targetGroup;
  22. }
  23. }
  24. }