using System.Collections.Generic; using UnityEngine.Scripting.APIUpdating; namespace UnityEngine.Rendering.Universal { /// /// Class ScriptableRendererData contains resources for a ScriptableRenderer. /// /// [MovedFrom("UnityEngine.Rendering.LWRP")] public abstract class ScriptableRendererData : ScriptableObject { internal bool isInvalidated { get; set; } /// /// Creates the instance of the ScriptableRenderer. /// /// The instance of ScriptableRenderer protected abstract ScriptableRenderer Create(); [SerializeField] List m_RendererFeatures = new List(10); /// /// List of additional render pass features for this renderer. /// public List rendererFeatures { get => m_RendererFeatures; } internal ScriptableRenderer InternalCreateRenderer() { isInvalidated = false; return Create(); } protected virtual void OnValidate() { isInvalidated = true; } protected virtual void OnEnable() { isInvalidated = true; } #if UNITY_EDITOR internal virtual Material GetDefaultMaterial(DefaultMaterialType materialType) { return null; } internal virtual Shader GetDefaultShader() { return null; } #endif } }