PackPlatformPCBuild.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using UnityEngine;
  5. using UnityEditor;
  6. namespace Pack
  7. {
  8. public partial class PackPlatformPC
  9. {
  10. protected override void ChangePlayerSettings()
  11. {
  12. base.ChangePlayerSettings();
  13. PlayerSettings.bundleVersion = gameVersionCode.ToString();
  14. PlayerSettings.defaultScreenWidth = 480;
  15. PlayerSettings.defaultScreenHeight = 800;
  16. PlayerSettings.displayResolutionDialog = ResolutionDialogSetting.Disabled;
  17. }
  18. public override BuildTarget GetBuildTarget()
  19. {
  20. return BuildTarget.StandaloneWindows64;
  21. }
  22. protected override string GetBuildOutputPath()
  23. {
  24. string path = base.GetBuildOutputPath();
  25. return path + "/Game.exe";
  26. }
  27. protected override void BuildAppCompleted(BuildOptions buildOptions)
  28. {
  29. base.BuildAppCompleted(buildOptions);
  30. string outPath = GetBuildOutputPath();
  31. string dirPath = Path.GetDirectoryName(outPath);
  32. string name = Path.GetFileNameWithoutExtension(outPath);
  33. string destPath = dirPath + "/" + name + "_Data/Plugins/VuplexWebViewChromium";
  34. string srcPath = Application.dataPath + "/Plugins/VuplexWebViewChromium";
  35. CopyAndReplaceDirectory(srcPath, destPath);
  36. }
  37. }
  38. }