RecorderSettingsAttribute.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. namespace UnityEditor.Recorder
  3. {
  4. /// <summary>
  5. /// This attribute allows binding a Recorder Settings instance with a Recorder.
  6. /// </summary>
  7. [AttributeUsage(AttributeTargets.Class, Inherited = false)]
  8. public class RecorderSettingsAttribute : Attribute
  9. {
  10. internal readonly Type recorderType;
  11. internal readonly string displayName;
  12. internal readonly string iconName;
  13. /// <summary>
  14. /// Constructor for the attribute.
  15. /// </summary>
  16. /// <param name="recorderType">The type of Recorder that uses this Recorder Settings instance.</param>
  17. /// <param name="displayName">The Recorder's display name.</param>
  18. public RecorderSettingsAttribute(Type recorderType, string displayName)
  19. {
  20. this.recorderType = recorderType;
  21. this.displayName = displayName;
  22. }
  23. public RecorderSettingsAttribute(Type recorderType, string displayName, string iconName)
  24. {
  25. this.iconName = iconName;
  26. this.recorderType = recorderType;
  27. this.displayName = displayName;
  28. }
  29. }
  30. }