Singularity/Library/PackageCache/com.unity.render-pipelines..../Runtime/Utilities/SceneRenderPipeline.cs

26 lines
574 B
C#
Raw Permalink Normal View History

2024-05-06 14:45:45 -04:00
using System;
using UnityEngine;
using UnityEngine.Rendering;
/// <summary>
/// Setup a specific render pipeline on scene loading.
/// </summary>
[ExecuteAlways]
public class SceneRenderPipeline : MonoBehaviour
{
/// <summary>
/// Scriptable Render Pipeline Asset to setup on scene load.
/// </summary>
public RenderPipelineAsset renderPipelineAsset;
void OnEnable()
{
GraphicsSettings.renderPipelineAsset = renderPipelineAsset;
}
void OnValidate()
{
GraphicsSettings.renderPipelineAsset = renderPipelineAsset;
}
}