Unity 6.3
0 онлайн 78 гостей 3 в системе
Вход

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,.