CopyETslnHelper.cs 601 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using UnityEditor;
  5. namespace ET
  6. {
  7. public static class CopyETslnHelper
  8. {
  9. public static void Run()
  10. {
  11. string etslnPath = Path.Combine(Directory.GetCurrentDirectory(), "ET.sln");
  12. if (File.Exists(etslnPath))
  13. {
  14. return;
  15. }
  16. List<string> slns = new List<string>();
  17. FileHelper.GetAllFiles(slns, "./Packages", "ET.sln");
  18. if (slns.Count == 0)
  19. {
  20. return;
  21. }
  22. string sourcePath = slns[0];
  23. File.Copy(sourcePath, etslnPath, true);
  24. }
  25. }
  26. }