ThresholdLabelAttribute.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Animancer // https://kybernetik.com.au/animancer // Copyright 2018-2024 Kybernetik //
  2. using System;
  3. namespace Animancer
  4. {
  5. /// <summary>[Editor-Conditional]
  6. /// Specifies a custom display label for the <c>Thresholds</c> column of a mixer transition.
  7. /// </summary>
  8. /// https://kybernetik.com.au/animancer/api/Animancer/ThresholdLabelAttribute
  9. ///
  10. [AttributeUsage(AttributeTargets.Field | AttributeTargets.Class | AttributeTargets.Struct, Inherited = true)]
  11. [System.Diagnostics.Conditional(Strings.UnityEditor)]
  12. public sealed class ThresholdLabelAttribute : Attribute
  13. {
  14. /************************************************************************************************************************/
  15. #if UNITY_EDITOR
  16. /// <summary>[Editor-Only] The label.</summary>
  17. public readonly string Label;
  18. #endif
  19. /************************************************************************************************************************/
  20. /// <summary>Creates a new <see cref="ThresholdLabelAttribute"/>.</summary>
  21. public ThresholdLabelAttribute(string label)
  22. {
  23. #if UNITY_EDITOR
  24. Label = label;
  25. #endif
  26. }
  27. /************************************************************************************************************************/
  28. }
  29. }