protected override void OnDisable() { EditorPrefs.onValueWasUpdated -= PlayModeTintColorChangedCallback; base.OnDisable(); DeregisterSelectedPane(clearActualView: false, sendEvents: true); // Host views are destroyed in the middle of an OnGUI loop, so we need to ensure that we're not invoking // OnGUI on destroyed instances. m_OnGUI = null; m_Update = null; }
private void CreateDelegates() { m_OnGUI = CreateDelegate("OnGUI"); m_OnFocus = CreateDelegate("OnFocus"); m_OnLostFocus = CreateDelegate("OnLostFocus"); m_OnProjectChange = CreateDelegate("OnProjectChange"); m_OnSelectionChange = CreateDelegate("OnSelectionChange"); m_OnDidOpenScene = CreateDelegate("OnDidOpenScene"); m_OnInspectorUpdate = CreateDelegate("OnInspectorUpdate"); m_OnHierarchyChange = CreateDelegate("OnHierarchyChange"); m_OnBecameVisible = CreateDelegate("OnBecameVisible"); m_OnBecameInvisible = CreateDelegate("OnBecameInvisible"); m_Update = CreateDelegate("Update"); m_ModifierKeysChanged = CreateDelegate("ModifierKeysChanged"); var methodInfo = GetPaneMethod("ShowButton"); if (methodInfo != null) { m_ShowButton = (EditorWindowShowButtonDelegate)Delegate.CreateDelegate(typeof(EditorWindowShowButtonDelegate), m_ActualView, methodInfo); } }