Unity-NorthStar / data /Packages /com.unity.render-pipelines.universal /Editor /ShaderGraph /AssetCallbacks /CreateUnlitShaderGraph.cs
| using System; | |
| using UnityEditor.ShaderGraph; | |
| using UnityEngine.Rendering; | |
| namespace UnityEditor.Rendering.Universal.ShaderGraph | |
| { | |
| static class CreateUnlitShaderGraph | |
| { | |
| [] | |
| public static void CreateUnlitGraph() | |
| { | |
| var target = (UniversalTarget)Activator.CreateInstance(typeof(UniversalTarget)); | |
| target.TrySetActiveSubTarget(typeof(UniversalUnlitSubTarget)); | |
| var blockDescriptors = new[] | |
| { | |
| BlockFields.VertexDescription.Position, | |
| BlockFields.VertexDescription.Normal, | |
| BlockFields.VertexDescription.Tangent, | |
| BlockFields.SurfaceDescription.BaseColor, | |
| }; | |
| GraphUtil.CreateNewGraphWithOutputs(new[] { target }, blockDescriptors); | |
| } | |
| } | |
| } | |