PostProcessBuild.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. #if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
  2. using System.IO;
  3. using UnityEngine;
  4. using UnityEditor;
  5. using UnityEditor.Callbacks;
  6. //-----------------------------------------------------------------------------
  7. // Copyright 2015-2021 RenderHeads Ltd. All rights reserved.
  8. //-----------------------------------------------------------------------------
  9. namespace RenderHeads.Media.AVProVideo.Editor
  10. {
  11. public class PostProcessBuild
  12. {
  13. [PostProcessBuild]
  14. public static void OnPostProcessBuild(BuildTarget target, string path)
  15. {
  16. bool x86 = false;
  17. #if UNITY_2017_3_OR_NEWER
  18. // 64-bit only from here on out, woo hoo!!! \o/
  19. #else
  20. x86 = target == BuildTarget.StandaloneOSXIntel || target == BuildTarget.StandaloneOSXUniversal;
  21. #endif
  22. if (x86)
  23. {
  24. string message = "AVPro Video doesn't support target StandaloneOSXIntel (32-bit), please use StandaloneOSXIntel64 (64-bit) or remove this PostProcessBuild script";
  25. Debug.LogError(message);
  26. EditorUtility.DisplayDialog("AVPro Video", message, "Ok");
  27. }
  28. }
  29. }
  30. }
  31. #endif // UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX