Files
PixelJumperHero/Library/PackageCache/com.unity.shadergraph@11.0.0/Editor/AssetCallbacks/CreateVFXShaderGraph.cs
2021-06-13 10:28:03 +02:00

24 lines
654 B
C#

#if VFX_GRAPH_10_0_0_OR_NEWER
using System;
using UnityEditor.ShaderGraph;
namespace UnityEditor.ShaderGraph
{
static class CreateVFXShaderGraph
{
[MenuItem("Assets/Create/Shader/VFX Shader Graph", false, 208)]
public static void CreateVFXGraph()
{
var target = (VFXTarget)Activator.CreateInstance(typeof(VFXTarget));
var blockDescriptors = new[]
{
BlockFields.SurfaceDescription.BaseColor,
BlockFields.SurfaceDescription.Alpha,
};
GraphUtil.CreateNewGraphWithOutputs(new[] {target}, blockDescriptors);
}
}
}
#endif