mathe/Library/PackageCache/com.unity.render-pipelines.core@14.0.8/Editor/Deprecated.cs
2024-09-20 20:30:10 +02:00

50 lines
2.0 KiB
C#

using System;
using System.Collections.Generic;
using UnityEngine;
namespace UnityEditor.Rendering
{
/// <summary>
/// This attributes tells a <see cref="VolumeComponentEditor"/> class which type of
/// <see cref="VolumeComponent"/> it's an editor for.
/// When you make a custom editor for a component, you need put this attribute on the editor
/// class.
/// </summary>
/// <seealso cref="VolumeComponentEditor"/>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
[Obsolete("VolumeComponentEditor property has been deprecated. Please use CustomEditor. #from(2022.2)")]
public sealed class VolumeComponentEditorAttribute : CustomEditor
{
/// <summary>
/// A type derived from <see cref="VolumeComponent"/>.
/// </summary>
public readonly Type componentType;
/// <summary>
/// Creates a new <see cref="VolumeComponentEditorAttribute"/> instance.
/// </summary>
/// <param name="componentType">A type derived from <see cref="VolumeComponent"/></param>
public VolumeComponentEditorAttribute(Type componentType)
: base(componentType, true)
{
this.componentType = componentType;
}
}
/// <summary>
/// Interface that should be used with [ScriptableRenderPipelineExtension(type))] attribute to dispatch ContextualMenu calls on the different SRPs
/// </summary>
/// <typeparam name="T">This must be a component that require AdditionalData in your SRP</typeparam>
[Obsolete("The menu items are handled automatically for components with the AdditionalComponentData attribute. #from(2022.2)", false)]
public interface IRemoveAdditionalDataContextualMenu<T>
where T : Component
{
/// <summary>
/// Remove the given component
/// </summary>
/// <param name="component">The component to remove</param>
/// <param name="dependencies">Dependencies.</param>
void RemoveComponent(T component, IEnumerable<Component> dependencies);
}
}