浏览代码

Do more efficient look-up of nodes in graph presenter update

/main
Peter Bay Bastian 7 年前
当前提交
24f84a48
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/MaterialGraphPresenter.cs

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/MaterialGraphPresenter.cs


// Find all nodes currently being drawn which are no longer in the graph (i.e. deleted)
var deletedElementPresenters = m_Elements
.OfType<MaterialNodePresenter>()
.Where(nd => !graph.GetNodes<INode>().Contains(nd.node))
.Where(nd => !graph.ContainsNodeGuid(nd.node.guid))
.OfType<GraphElementPresenter>()
.ToList();

正在加载...
取消
保存