SupportedOnRenderPipelineAttribute
Set which render pipelines make a class active.
Read time 4 minutesLast updated 5 days ago
Definition
- Type: Class
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
- Inherits from: Attribute
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]public class SupportedOnRenderPipelineAttribute : Attribute
Remarks
Add above a class to set which Render Pipeline Assets make a class active. For example, .
[SupportedOnRenderPipeline][SupportedOnRenderPipeline(typeof(HDRenderPipelineAsset))[SupportedOnRenderPipeline][SupportedOnRenderPipeline]BehaviourEditorusing UnityEditor;using UnityEngine;using UnityEngine.Rendering;[CustomEditor(typeof(Behaviour))][SupportedOnRenderPipeline]public class BehaviourEditor : Editor{ public override void OnInspectorGUI() { EditorGUILayout.LabelField($"{nameof(BehaviourEditor)} is supported on the currently active render pipeline."); }}public class Behaviour : MonoBehaviour{}
Additional Resources: RenderPipelineAsset.
Properties
Property | Description |
|---|---|
| isSupportedOnCurrentPipeline | The value is |
| renderPipelineTypes | The Render Pipeline Assets that support the attribute. |
Methods
Method | Description |
|---|---|
| GetSupportedMode | Use |
Static Methods
Method | Description |
|---|---|
| IsTypeSupportedOnRenderPipeline | Use this method to determine whether a type has the SupportedOnRenderPipelineAttribute attribute and determine whether a RenderPipelineAsset type supports that attribute. |
Enums
Enum | Description |
|---|---|
| SupportedOnRenderPipelineAttribute.SupportedMode | Whether the |