BuildConfig_Custom.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. };
  25. /// <summary>
  26. /// 所有热更新dll列表。放到此列表中的dll在打包时OnFilterAssemblies回调中被过滤。
  27. /// </summary>
  28. public static List<string> AllHotUpdateDllNames { get; } = MonoHotUpdateDllNames.Concat(new List<string>
  29. {
  30. // 这里放除了s_monoHotUpdateDllNames以外的脚本不需要挂到资源上的dll列表
  31. "Game.HotUpdate.dll",
  32. }).ToList();
  33. public static List<string> AOTMetaDlls { get; } = new List<string>()
  34. {
  35. "mscorlib.dll",
  36. "System.dll",
  37. "System.Core.dll", // 如果使用了Linq,需要这个
  38. "ThirdParty.dll",
  39. "Game.Launcher.dll",
  40. };
  41. public static List<string> AssetBundleFiles { get; } = new List<string>
  42. {
  43. "common",
  44. };
  45. }
  46. }