using System; namespace UnityEngine.Rendering.PostProcessing { /// /// Use this attribute to associate a to a /// type. /// /// /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] public sealed class PostProcessAttribute : Attribute { /// /// The renderer type to associate with a . /// public readonly Type renderer; /// /// The injection point for the effect. /// public readonly PostProcessEvent eventType; /// /// The menu item name to set for the effect. You can use a `/` character to add sub-menus. /// public readonly string menuItem; /// /// Should this effect be allowed in the Scene View? /// public readonly bool allowInSceneView; internal readonly bool builtinEffect; /// /// Creates a new attribute. /// /// The renderer type to associate with a /// The injection point for the effect /// The menu item name to set for the effect. You can use a `/` character to add sub-menus. /// Should this effect be allowed in the Scene View? public PostProcessAttribute(Type renderer, PostProcessEvent eventType, string menuItem, bool allowInSceneView = true) { this.renderer = renderer; this.eventType = eventType; this.menuItem = menuItem; this.allowInSceneView = allowInSceneView; builtinEffect = false; } internal PostProcessAttribute(Type renderer, string menuItem, bool allowInSceneView = true) { this.renderer = renderer; this.menuItem = menuItem; this.allowInSceneView = allowInSceneView; builtinEffect = true; } } }