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."); } } }