Version: Unity 6 Preview (6000.0)
LanguageEnglish
  • C#

RenderPipelineEditorUtility.GetDerivedTypesSupportedOnCurrentPipeline

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static Type[] GetDerivedTypesSupportedOnCurrentPipeline();

Returns

Type[] Child types of the base type supported on current pipeline.

Description

Returns the types that're children of T and have a SupportedOnRenderPipelineAttribute corresponding to the render pipeline you're using. Order of the return types is arbitrary.

using UnityEditor.Rendering;
using UnityEngine;
using UnityEngine.Rendering;

public interface IBaseClass { }

[SupportedOnRenderPipeline] public class SupportedOnClass : IBaseClass { }

public class BehaviourTest : MonoBehaviour { void Start() { var types = RenderPipelineEditorUtility.GetDerivedTypesSupportedOnCurrentPipeline<IBaseClass>(); foreach (var type in types) { Debug.Log($"{type.Name} is supported on current Render Pipeline."); } } }

Additional resources: SupportedOnRenderPipelineAttribute.