浏览代码

Use asset name for sub-graph nodes

/main
Peter Bay Bastian 7 年前
当前提交
4391569c
共有 1 个文件被更改,包括 12 次插入1 次删除
  1. 13
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialNodeView.cs

13
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialNodeView.cs


using UnityEditor.Graphing;
using UnityEditor.ShaderGraph;
using UnityEditor.ShaderGraph.Drawing.Controls;
using UnityEngine.WSA;
namespace UnityEditor.ShaderGraph.Drawing
{

return;
node = inNode;
title = inNode.name;
UpdateTitle();
m_ControlsContainer = new VisualElement
{

}
}
void UpdateTitle()
{
var subGraphNode = node as SubGraphNode;
if (subGraphNode != null)
title = subGraphNode.subGraphAsset.name;
else
title = node.name;
}
UpdateTitle();
expanded = node.drawState.expanded;
// Update slots to match node modification

正在加载...
取消
保存