MyCustomBuildProcessor.cs 715 B

1234567891011121314151617181920
  1. using System.IO;
  2. using UnityEditor;
  3. using UnityEditor.Android;
  4. using UnityEngine;
  5. class MyCustomBuildProcessor : IPostGenerateGradleAndroidProject {
  6. public int callbackOrder { get { return 0; } }
  7. public void OnPostGenerateGradleAndroidProject(string path) {
  8. Debug.Log("MyCustomBuildProcessor.OnPostGenerateGradleAndroidProject at path " + path);
  9. string dataPath = Application.dataPath;
  10. string folderAssetsDB = System.IO.Path.Combine(dataPath.Replace("Assets", ""), path, "src/main/assets/DB");
  11. //Debug.Log(System.IO.Directory.Exists(folderAssetsDB));
  12. if (Directory.Exists(folderAssetsDB)) {
  13. Directory.Delete(folderAssetsDB, true);
  14. }
  15. }
  16. }