Exemplo n.º 1
0
    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);
    }
Exemplo n.º 2
0
    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);
        //    //>>>>>>>>>>>>>>>>
    }