MegascansPostProcess.cs 953 B

123456789101112131415161718192021222324252627282930
  1. #if UNITY_EDITOR
  2. using UnityEditor;
  3. using UnityEngine;
  4. namespace Quixel
  5. {
  6. public class MegascansPostProcess : AssetPostprocessor
  7. {
  8. static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
  9. {
  10. // if(!MegascansUtilities.isLegacy())
  11. // {
  12. // Debug.Log("Automatically changing API Compatibility Level.");
  13. // PlayerSettings.SetApiCompatibilityLevel(EditorUserBuildSettings.selectedBuildTargetGroup, ApiCompatibilityLevel.NET_4_6);
  14. // }
  15. // loop through imported files, see if it's a .qxl file.
  16. for (int i = 0; i < importedAssets.Length; ++i)
  17. {
  18. if (importedAssets[i].Contains("MegascansImporterWindow.cs"))
  19. {
  20. MegascansImporterWindow.Init();
  21. }
  22. }
  23. }
  24. }
  25. }
  26. #endif