RenderPipelineEditorUtility.GetDerivedTypesSupportedOnCurrentPipeline
Declaration
public static Type[] GetDerivedTypesSupportedOnCurrentPipeline();Возвращаемое значение
Type[] Дочерние типы базового типа, поддерживаемые в текущем конвейере.
Описание
Возвращает типы, которые являются дочерними типами T и имеют типы SupportedOnRenderPipelineAttribute, соответствующие используемому конвейеру отображения. Порядок возвращаемых типов произвольный.
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."); } } }
Дополнительные ресурсы: ,SupportedOnRenderPipelineAttribute,.