using System; using System.Collections.Generic; namespace UnityEngine.Rendering.Universal { /// /// Use this attribute to show a warning next to a VolumeComponent's UI if the specified /// ScriptableRendererFeatures are not added to the active URP Asset's default renderer /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] public sealed class VolumeRequiresRendererFeatures : Attribute { internal HashSet TargetFeatureTypes; /// /// Creates a new attribute instance. /// /// The list of required ScriptableRendererFeature types. If any of these types are missing, the VolumeComponent UI shows a warning. public VolumeRequiresRendererFeatures(params Type[] featureTypes) { TargetFeatureTypes = (featureTypes != null) ? new HashSet(featureTypes) : new HashSet(); TargetFeatureTypes.Remove(null); } } }