public void Dispose()
 {
     onUpdateAssetClick       = null;
     onConvertToSubgraphClick = null;
     onShowInProjectClick     = null;
     if (m_GraphView != null)
     {
         foreach (var node in m_GraphView.Children().OfType <MaterialNodeView>())
         {
             node.Dispose();
         }
         m_GraphView = null;
     }
     if (m_GraphInspectorView != null)
     {
         m_GraphInspectorView.Dispose();
     }
     if (previewManager != null)
     {
         previewManager.Dispose();
         previewManager = null;
     }
     if (m_SearchWindowProvider != null)
     {
         Object.DestroyImmediate(m_SearchWindowProvider);
         m_SearchWindowProvider = null;
     }
 }
Exemple #2
0
 public void Dispose()
 {
     if (m_GraphView != null)
     {
         saveRequested = null;
         convertToSubgraphRequested = null;
         showInProjectRequested     = null;
         foreach (var node in m_GraphView.Children().OfType <MaterialNodeView>())
         {
             node.Dispose();
         }
         m_GraphView = null;
     }
     if (previewManager != null)
     {
         previewManager.Dispose();
         previewManager = null;
     }
     if (m_SearchWindowProvider != null)
     {
         Object.DestroyImmediate(m_SearchWindowProvider);
         m_SearchWindowProvider = null;
     }
 }