private void OnWindowDestroyed(Transform obj) { if (obj == m_proBuilderWindow) { m_proBuilderWindow = null; UVAutoEditorPanel autoUV = m_uvAutoEditorPanel.GetComponent <UVAutoEditorPanel>(); if (autoUV) { autoUV.Tool = null; } UVManualEditorPanel manualUV = m_uvManualEditorPanel.GetComponent <UVManualEditorPanel>(); if (manualUV) { manualUV.Tool = null; } } }
private void OnWindowCreated(Transform obj) { if (obj == m_wm.GetWindow("ProBuilder")) { m_proBuilderWindow = obj; if (m_tool != null) { m_tool.SelectionChanged -= OnToolSelectionChanged; } m_tool = IOC.Resolve <IProBuilderTool>(); OnToolSelectionChanged(); m_tool.SelectionChanged += OnToolSelectionChanged; UVAutoEditorPanel autoUV = m_uvAutoEditorPanel.GetComponent <UVAutoEditorPanel>(); autoUV.Tool = m_tool; UVManualEditorPanel manualUV = m_uvManualEditorPanel.GetComponent <UVManualEditorPanel>(); manualUV.Tool = m_tool; } }