public void BringThisToForeground() { #if !UNITY_EDITOR if (ExternalWindowTracker.EditorFocusStealing) { ExternalWindowTracker.ForceBringToForeground(ExternalWindowTracker.GetWindowByTitle(ExternalWindowTracker.editorWindowTitle)); } #else string switcherWindowName = Application.productName; ExternalWindowTracker.ForceBringToForeground(ExternalWindowTracker.GetWindowByTitle(switcherWindowName)); #endif setJoyToKeyConfigIfNotAlreadySet(SWITCHER_JOYTOKEY_CONFIG); }
public virtual void FocusWindow() { GameData currentlySelectedGame = this._srcGame; string windowTitle = currentlySelectedGame.windowTitle; if (string.IsNullOrEmpty(windowTitle)) { ExternalWindowTracker.ForceBringToForeground(ExternalWindowTracker.runningPrimaryWindowGuess(process.Id));//currentGameRunner.process.Id)); } else { ExternalWindowTracker.ForceBringToForeground(ExternalWindowTracker.GetWindowByTitle(windowTitle)); } // /// Alt way <<<<<<<<<<<<<<<< // SendKeyStrokesToWindow(windowTitle); // //>>>>>>>>>>>>>>>> }