|
|
|
|
|
|
|
|
|
|
Assert.IsNotNull(graph.masterNode, "No master node in graph."); |
|
|
|
|
|
|
|
//var graphAsset = AssetDatabase.LoadAssetAtPath<MaterialGraphAsset>(filePath);
|
|
|
|
//
|
|
|
|
|
|
|
|
//Assert.IsNotNull(graphAsset, "Graph asset not found");
|
|
|
|
|
|
|
|
|
|
|
// Generate the shader
|
|
|
|
List<PropertyGenerator.TextureInfo> configuredTextures; |
|
|
|
var shaderString = |
|
|
|
graph.masterNode.GetFullShader(GenerationMode.ForReals, graph.name, out configuredTextures); |
|
|
|
graph.masterNode.GetFullShader(GenerationMode.ForReals, Path.GetFileNameWithoutExtension(filePath), out configuredTextures); |
|
|
|
|
|
|
|
var rootPath = Directory.GetParent(Directory.GetParent(Application.dataPath).ToString()); |
|
|
|
var shaderTemplatePath = Path.Combine(rootPath.ToString(), "ShaderTemplates"); |
|
|
|