CustomGUIAttribute.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Animancer // https://kybernetik.com.au/animancer // Copyright 2018-2024 Kybernetik //
  2. #if UNITY_EDITOR
  3. using System;
  4. namespace Animancer.Editor
  5. {
  6. /// <summary>[Editor-Only]
  7. /// Attribute for classes which implement <see cref="CustomGUI{T}"/> to specify the type of objects they apply to.
  8. /// </summary>
  9. /// https://kybernetik.com.au/animancer/api/Animancer.Editor/CustomGUIAttribute
  10. ///
  11. [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
  12. public sealed class CustomGUIAttribute : Attribute
  13. {
  14. /************************************************************************************************************************/
  15. /// <summary>The type of object which the attributed <see cref="CustomGUI{T}"/> class applies to.</summary>
  16. public readonly Type TargetType;
  17. /************************************************************************************************************************/
  18. /// <summary>Creates a new <see cref="CustomGUIAttribute"/>.</summary>
  19. public CustomGUIAttribute(Type targetType)
  20. {
  21. TargetType = targetType;
  22. }
  23. /************************************************************************************************************************/
  24. }
  25. }
  26. #endif