private static void OnPlayStateChanged( #if UNITY_2017_2_OR_NEWER PlayModeStateChange state #endif ) { if (NGNavSelectionWindow.isPlaging == true && EditorApplication.isPlayingOrWillChangePlaymode == false) { NGNavSelectionWindow.isPlaging = false; NGNavSelectionWindow.SaveHistoric(); } else if (EditorApplication.isCompiling == true && NGNavSelectionWindow.savedOnCompile == false) { NGNavSelectionWindow.savedOnCompile = true; NGNavSelectionWindow.SaveHistoric(); } }
private static void HandleMouseInputs() { if (EditorApplication.isCompiling == true) { if (NGNavSelectionWindow.savedOnCompile == false) { NGNavSelectionWindow.savedOnCompile = true; NGNavSelectionWindow.SaveHistoric(); } return; } IntPtr activeWindow = NativeMethods.GetActiveWindow(); if (activeWindow != IntPtr.Zero) { // Go to previous selection. if (NativeMethods.GetAsyncKeyState(5) != 0) { if (NGNavSelectionWindow.buttonWasDown == false) { NGNavSelectionWindow.buttonWasDown = true; NGNavSelectionWindow.SelectPreviousSelection(); } } // Go to next selection. else if (NativeMethods.GetAsyncKeyState(6) != 0) { if (NGNavSelectionWindow.buttonWasDown == false) { NGNavSelectionWindow.buttonWasDown = true; NGNavSelectionWindow.SelectNextSelection(); } } else { NGNavSelectionWindow.buttonWasDown = false; } } }