浏览代码

Properly dispose of MaterialNodeViews

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

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/GraphEditorView.cs


node.onModified -= OnNodeChanged;
var nodeView = m_GraphView.nodes.ToList().OfType<MaterialNodeView>().FirstOrDefault(p => p.node != null && p.node.guid == node.guid);
if (nodeView != null)
{
nodeView.Dispose();
}
}
foreach (var node in m_Graph.addedNodes)

onUpdateAssetClick = null;
onConvertToSubgraphClick = null;
onShowInProjectClick = null;
if (m_GraphView != null)
{
foreach (var node in m_GraphView.Children().OfType<MaterialNodeView>())
node.Dispose();
}
if (m_GraphInspectorView != null) m_GraphInspectorView.Dispose();
if (previewSystem != null)
{

正在加载...
取消
保存