浏览代码

Copy node title or property name for properties created inside sub-graph when converting to sub-graph (fixes #114)

/main
Peter Bay Bastian 7 年前
当前提交
ce26a5b8
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/MaterialGraphEditWindow.cs

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/MaterialGraphEditWindow.cs


if (prop != null)
{
var materialGraph = (AbstractMaterialGraph)graphObject.graph;
var fromPropertyNode = fromNode as PropertyNode;
var fromProperty = fromPropertyNode != null ? materialGraph.properties.FirstOrDefault(p => p.guid == fromPropertyNode.propertyGuid) : null;
prop.displayName = fromProperty != null ? fromProperty.displayName : fromNode.name;
subGraph.AddShaderProperty(prop);
var propNode = new PropertyNode();
{

正在加载...
取消
保存