BuildParameters.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEditor;
  4. namespace YooAsset.Editor
  5. {
  6. /// <summary>
  7. /// 构建参数
  8. /// </summary>
  9. public class BuildParameters
  10. {
  11. /// <summary>
  12. /// SBP构建参数
  13. /// </summary>
  14. public class SBPBuildParameters
  15. {
  16. /// <summary>
  17. /// 生成代码防裁剪配置
  18. /// </summary>
  19. public bool WriteLinkXML = true;
  20. /// <summary>
  21. /// 缓存服务器地址
  22. /// </summary>
  23. public string CacheServerHost;
  24. /// <summary>
  25. /// 缓存服务器端口
  26. /// </summary>
  27. public int CacheServerPort;
  28. }
  29. /// <summary>
  30. /// 可编程构建管线的参数
  31. /// </summary>
  32. public SBPBuildParameters SBPParameters;
  33. /// <summary>
  34. /// 输出的根目录
  35. /// </summary>
  36. public string OutputRoot;
  37. /// <summary>
  38. /// 构建的平台
  39. /// </summary>
  40. public BuildTarget BuildTarget;
  41. /// <summary>
  42. /// 构建管线
  43. /// </summary>
  44. public EBuildPipeline BuildPipeline;
  45. /// <summary>
  46. /// 构建模式
  47. /// </summary>
  48. public EBuildMode BuildMode;
  49. /// <summary>
  50. /// 构建的版本(资源版本号)
  51. /// </summary>
  52. public int BuildVersion;
  53. /// <summary>
  54. /// 内置资源标签集合(首包资源标签)
  55. /// 注意:分号为分隔符
  56. /// </summary>
  57. public string BuildinTags;
  58. /// <summary>
  59. /// 验证构建结果
  60. /// </summary>
  61. public bool VerifyBuildingResult = false;
  62. /// <summary>
  63. /// 启用可寻址资源定位
  64. /// </summary>
  65. public bool EnableAddressable = false;
  66. /// <summary>
  67. /// 拷贝内置资源文件到StreamingAssets目录(首包资源文件)
  68. /// </summary>
  69. public bool CopyBuildinTagFiles = false;
  70. /// <summary>
  71. /// 加密类
  72. /// </summary>
  73. public IEncryptionServices EncryptionServices = null;
  74. /// <summary>
  75. /// 补丁文件名称的样式
  76. /// </summary>
  77. public EOutputNameStyle OutputNameStyle = EOutputNameStyle.HashName;
  78. /// <summary>
  79. /// 压缩选项
  80. /// </summary>
  81. public ECompressOption CompressOption = ECompressOption.Uncompressed;
  82. /// <summary>
  83. /// 禁止写入类型树结构(可以降低包体和内存并提高加载效率)
  84. /// </summary>
  85. public bool DisableWriteTypeTree = false;
  86. /// <summary>
  87. /// 忽略类型树变化
  88. /// </summary>
  89. public bool IgnoreTypeTreeChanges = true;
  90. /// <summary>
  91. /// 获取内置资源标签列表(首包资源标签)
  92. /// </summary>
  93. public List<string> GetBuildinTags()
  94. {
  95. return StringUtility.StringToStringList(BuildinTags, ';');
  96. }
  97. }
  98. }