9092858a58
I updated everything to the latest Unity Editor. Also realized I had the wrong shaders on my hairs, those are fixed and the hairs look MUCH better!
27 lines
939 B
C#
27 lines
939 B
C#
using System;
|
|
using UnityEditor.ShaderGraph;
|
|
using UnityEngine.Rendering;
|
|
|
|
namespace UnityEditor.Rendering.Universal.ShaderGraph
|
|
{
|
|
static class CreateUnlitShaderGraph
|
|
{
|
|
[MenuItem("Assets/Create/Shader Graph/URP/Unlit Shader Graph", priority = CoreUtils.Priorities.assetsCreateShaderMenuPriority + 1)]
|
|
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);
|
|
}
|
|
}
|
|
}
|