Pin URP renderer feature release
This commit is contained in:
parent
b8259a8e52
commit
6c73788368
3 changed files with 17 additions and 3 deletions
|
|
@ -1,3 +1,5 @@
|
|||
using System.Linq;
|
||||
using GameCult.Eve.UnityScene;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
|
@ -5,6 +7,7 @@ using UnityEngine.Rendering.Universal;
|
|||
|
||||
public static class GenericEveUnityRenderPipeline
|
||||
{
|
||||
private const string PostProcessDataGuid = "41439944d30ece34e96484bdb6645b55";
|
||||
private const string RendererPath = "Assets/GenericEveUnityRenderer.asset";
|
||||
private const string PipelinePath = "Assets/GenericEveUnityRenderPipeline.asset";
|
||||
|
||||
|
|
@ -17,6 +20,17 @@ public static class GenericEveUnityRenderPipeline
|
|||
AssetDatabase.CreateAsset(renderer, RendererPath);
|
||||
}
|
||||
|
||||
renderer.postProcessData = AssetDatabase.LoadAssetAtPath<PostProcessData>(
|
||||
AssetDatabase.GUIDToAssetPath(PostProcessDataGuid));
|
||||
if (!renderer.rendererFeatures.OfType<EveUnityRendererFeature>().Any())
|
||||
{
|
||||
var feature = ScriptableObject.CreateInstance<EveUnityRendererFeature>();
|
||||
feature.name = "Eve Unity World Effects";
|
||||
AssetDatabase.AddObjectToAsset(feature, renderer);
|
||||
renderer.rendererFeatures.Add(feature);
|
||||
}
|
||||
EditorUtility.SetDirty(renderer);
|
||||
|
||||
var pipeline = AssetDatabase.LoadAssetAtPath<UniversalRenderPipelineAsset>(PipelinePath);
|
||||
if (pipeline == null)
|
||||
{
|
||||
|
|
|
|||
Reference in a new issue