DisplayNameAttribute.cs 752 B

12345678910111213141516171819202122232425
  1. using System;
  2. namespace UnityEngine.Rendering.PostProcessing
  3. {
  4. /// <summary>
  5. /// Use this attribute to change the label of a field displayed in the inspector.
  6. /// </summary>
  7. [AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
  8. public sealed class DisplayNameAttribute : Attribute
  9. {
  10. /// <summary>
  11. /// The label displayed in the inspector.
  12. /// </summary>
  13. public readonly string displayName;
  14. /// <summary>
  15. /// Creates a new attribute.
  16. /// </summary>
  17. /// <param name="displayName">The label to display in the inspector</param>
  18. public DisplayNameAttribute(string displayName)
  19. {
  20. this.displayName = displayName;
  21. }
  22. }
  23. }