|
|
|
|
|
|
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) |
|
|
|
{ |
|
|
|