BuildPostprocessor.cs 561 B

12345678910111213141516171819202122232425
  1. 
  2. using UnityEditor;
  3. using UnityEditor.Callbacks;
  4. using UnityEngine;
  5. namespace XGame.Editor.Build
  6. {
  7. public class BuildPostprocessor
  8. {
  9. [PostProcessBuild]
  10. private static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
  11. {
  12. if (target == BuildTarget.Android)
  13. {
  14. #if UNITY_ANDROID
  15. ObbUtil.GenerateObb(pathToBuiltProject);
  16. #endif
  17. }
  18. BuildLog.Log($"OnPostProcessBuild finish. target:{target} path:{pathToBuiltProject}");
  19. }
  20. }
  21. }