internal void ValidateWindowBackendForCurrentView() { if (!EditorWindowBackendManager.IsBackendCompatible(windowBackend, this)) { //We create a new compatible backend windowBackend = EditorWindowBackendManager.GetBackend(this); } }
protected void RegisterSelectedPane(bool sendEvents) { if (!m_ActualView) { return; } m_ActualView.m_Parent = this; if (!EditorWindowBackendManager.IsBackendCompatible(windowBackend, this)) { //We create a new compatible backend windowBackend = EditorWindowBackendManager.GetBackend(this); } ((IEditorWindowModel)this).onRegisterWindow?.Invoke(); if (GetPaneMethod("Update") != null) { EditorApplication.update -= SendUpdate; EditorApplication.update += SendUpdate; } if (GetPaneMethod("ModifierKeysChanged") != null) { EditorApplication.modifierKeysChanged -= SendModKeysChanged; EditorApplication.modifierKeysChanged += SendModKeysChanged; } m_ActualView.MakeParentsSettingsMatchMe(); if (m_ActualView.m_FadeoutTime != 0) { EditorApplication.update -= m_ActualView.CheckForWindowRepaint; EditorApplication.update += m_ActualView.CheckForWindowRepaint; } if (sendEvents) { try { m_OnBecameVisible?.Invoke(); m_OnFocus?.Invoke(); } catch (TargetInvocationException ex) { // We need to catch these so the window initialization doesn't get screwed if (ex.InnerException != null) { Debug.LogError(ex.InnerException.GetType().Name + ":" + ex.InnerException.Message); } } } UpdateViewMargins(m_ActualView); }
private void ValidateWindowBackendForCurrentView() { if (!EditorWindowBackendManager.IsBackendCompatible(windowBackend, this)) { //We create a new compatible backend windowBackend = EditorWindowBackendManager.GetBackend(this); } ((IEditorWindowModel)this).rootVisualElementCreated?.Invoke(); }