BuildConfig_Custom.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using UnityEditor;
  8. using UnityEngine;
  9. namespace HybridCLR
  10. {
  11. public static partial class BuildConfig
  12. {
  13. /// <summary>
  14. /// 需要在Prefab上挂脚本的热更dll名称列表,不需要挂到Prefab上的脚本可以不放在这里
  15. /// 但放在这里的dll即使勾选了 AnyPlatform 也会在打包过程中被排除
  16. ///
  17. /// 另外请务必注意: 需要挂脚本的dll的名字最好别改,因为这个列表无法热更(上线后删除或添加某些非挂脚本dll没问题)。
  18. ///
  19. /// 注意:多热更新dll不是必须的!大多数项目完全可以只有HotFix.dll这一个热更新模块,纯粹出于演示才故意设计了两个热更新模块。
  20. /// 另外,是否热更新跟dll名毫无关系,凡是不打包到主工程的,都可以是热更新dll。
  21. /// </summary>
  22. public static List<string> MonoHotUpdateDllNames { get; } = new List<string>()
  23. {
  24. "HotFix.dll",
  25. };
  26. /// <summary>
  27. /// 所有热更新dll列表。放到此列表中的dll在打包时OnFilterAssemblies回调中被过滤。
  28. /// </summary>
  29. public static List<string> AllHotUpdateDllNames { get; } = MonoHotUpdateDllNames.Concat(new List<string>
  30. {
  31. // 这里放除了s_monoHotUpdateDllNames以外的脚本不需要挂到资源上的dll列表
  32. "HotFix2.dll",
  33. }).ToList();
  34. public static List<string> AOTMetaDlls { get; } = new List<string>()
  35. {
  36. "mscorlib.dll",
  37. "System.dll",
  38. "System.Core.dll", // 如果使用了Linq,需要这个
  39. };
  40. public static List<string> AssetBundleFiles { get; } = new List<string>
  41. {
  42. "common",
  43. };
  44. }
  45. }