Class VolumeComponentEditorAttribute
This attribute tells the VolumeComponentEditor class which type of VolumeComponent it is an editor for. It is used to associate a custom editor with a specific volume component, enabling the editor to handle its custom properties and settings.
Implements
Inherited Members
Namespace: UnityEditor.Rendering
Assembly: Unity.RenderPipelines.Core.Editor.dll
Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
[Obsolete("VolumeComponentEditor property has been deprecated. Please use CustomEditor. #from(2022.2)")]
public sealed class VolumeComponentEditorAttribute : CustomEditor, _Attribute
Remarks
When creating a custom editor for a VolumeComponent, this attribute must be applied to the editor class to ensure it targets the appropriate component. This functionality has been deprecated, and developers are encouraged to use the CustomEditor attribute instead for newer versions.
The attribute specifies which VolumeComponent type the editor class is responsible for. Typically, it is used in conjunction with custom editor UI drawing and handling logic for the specified volume component. This provides a way for developers to create custom editing tools for their volume components in the Unity Inspector.
Since Unity 2022.2, this functionality has been replaced by the CustomEditor attribute, and as such, it is advised to update any existing custom editors to use the newer approach.
Constructors
VolumeComponentEditorAttribute(Type)
Creates a new VolumeComponentEditorAttribute instance.
Declaration
public VolumeComponentEditorAttribute(Type componentType)
Parameters
Type | Name | Description |
---|---|---|
Type | componentType | A type derived from VolumeComponent that the editor is responsible for. |
Remarks
This constructor initializes the attribute with the component type that the editor will target. The component type is a subclass of VolumeComponent and provides the necessary context for the editor class to function properly within the Unity Editor.
See Also
Fields
componentType
A type derived from VolumeComponent that this editor is responsible for.
Declaration
public readonly Type componentType
Field Value
Type | Description |
---|---|
Type |
Remarks
This field holds the type of the volume component that the editor class will handle. The type should be a subclass of VolumeComponent and is used to associate the editor with the specific component type.