PostProcessEditorAttribute.cs 940 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. namespace UnityEditor.Rendering.PostProcessing
  3. {
  4. /// <summary>
  5. /// Tells a <see cref="PostProcessEffectEditor{T}"/> class which run-time type it's an editor
  6. /// for. When you make a custom editor for an effect, you need put this attribute on the editor
  7. /// class.
  8. /// </summary>
  9. /// <seealso cref="PostProcessEffectEditor{T}"/>
  10. [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
  11. public sealed class PostProcessEditorAttribute : Attribute
  12. {
  13. /// <summary>
  14. /// The type that this editor can edit.
  15. /// </summary>
  16. public readonly Type settingsType;
  17. /// <summary>
  18. /// Creates a new attribute.
  19. /// </summary>
  20. /// <param name="settingsType">The type that this editor can edit</param>
  21. public PostProcessEditorAttribute(Type settingsType)
  22. {
  23. this.settingsType = settingsType;
  24. }
  25. }
  26. }