BuildCommandAttribute.cs 629 B

12345678910111213141516171819
  1. using System;
  2. namespace XGame.Editor.Build
  3. {
  4. /// <summary>
  5. /// 为避免Priority冲突,推荐项目自定义Priority时
  6. /// 使用BuildCommandPriority已定义好的预留枚举(Pre、Post前缀)或者 +/- N
  7. /// 如:[BuildCommand((uint)BuildCommandPriority.ExportAssets + 1)]
  8. /// </summary>
  9. [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
  10. internal class BuildCommandAttribute : Attribute
  11. {
  12. public uint Priority { get; private set; }
  13. public BuildCommandAttribute(uint priority)
  14. {
  15. Priority = priority;
  16. }
  17. }
  18. }