浏览代码

Re-added this functionality since I will remove it in another PR

/main
Martin Thorzen 7 年前
当前提交
93058019
共有 2 个文件被更改,包括 8 次插入7 次删除
  1. 2
      com.unity.shadergraph/Editor/Data/Graphs/AbstractMaterialGraph.cs
  2. 13
      com.unity.shadergraph/Editor/Drawing/Views/MaterialNodeView.cs

2
com.unity.shadergraph/Editor/Data/Graphs/AbstractMaterialGraph.cs


set { m_PreviewData = value; }
}
public string name { get; set; }
[SerializeField]
string m_Path;

13
com.unity.shadergraph/Editor/Drawing/Views/MaterialNodeView.cs


public void ShowGeneratedCode()
{
// var graph = (AbstractMaterialGraph)node.owner;
//
// string path = String.Format("Temp/GeneratedFromGraph-{0}-{1}-{2}.shader", SanitizeName(graph.name), SanitizeName(node.name), node.guid);
//
// if (GraphUtil.WriteToFile(path, ConvertToShader()))
// GraphUtil.OpenFile(path);
var graph = (AbstractMaterialGraph)node.owner;
string path = String.Format("Temp/GeneratedFromGraph-{0}-{1}-{2}.shader", SanitizeName(graph.name), SanitizeName(node.name), node.guid);
if (GraphUtil.WriteToFile(path, ConvertToShader()))
GraphUtil.OpenFile(path);
}
string ConvertToShader()

正在加载...
取消
保存