WuhuIslandTesting/Library/PackageCache/com.unity.render-pipelines.core@8148.0.3-1/Runtime/Utilities/SceneRenderPipeline.cs
2025-01-07 02:06:59 +01:00

25 lines
574 B
C#

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;
}
}