浏览代码

Added functionality to double click on a subgraph node to open it up in a new shader graph window

/main
Martin Thorzen 7 年前
当前提交
50036920
共有 1 个文件被更改,包括 16 次插入0 次删除
  1. 16
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialNodeView.cs

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


UpdateSize();
}*/
if (node is SubGraphNode)
{
RegisterCallback<MouseDownEvent>(OnSubGraphDoubleClick);
}
}
void OnSubGraphDoubleClick(MouseDownEvent evt)
{
if (evt.clickCount == 2)
{
SubGraphNode subgraphNode = node as SubGraphNode;
var path = AssetDatabase.GetAssetPath(subgraphNode.subGraphAsset);
ShaderGraphImporterEditor.ShowGraphEditWindow(path);
}
}
public AbstractMaterialNode node { get; private set; }

正在加载...
取消
保存