PatHightree / SpaceNavigator

SpaceNavigator driver for Unity3D
MIT License
173 stars 52 forks source link

Add gameview focus setting #28

Closed hybridherbst closed 3 years ago

hybridherbst commented 3 years ago

This PR adds a new setting for runtime navigation that prevents scene view navigation only when the game view is focussed. Rationale: when using a runtime navigation model (e.g. FlyAround), scene view navigation should still be possible, only not when the game view is currently active. Otherwise this leads to "double navigation" in both windows.

If you think this is actually the same intent as "Runtime Nav" happy to change this PR to add the focus condition to that instead.

PatHightree commented 3 years ago

Great idea, I originally added the RuntimeNav option for games which use traditional controls. When the game also uses SN control, double navigation is indeed a problem.

However, I think it would be more logical to check whether the scene view has focus instead of the game view because that's the one you want to toggle the behaviour for. The settings window would also read more clearly then. [V] Runtime Editor Navigation [V] On SceneView focus

hybridherbst commented 3 years ago

I kinda disagree that it should check for SceneView, GameView was deliberate :)

Reason: GameView in Unity loses focus and input whenever it is not focussed already, while navigating the scene with one hand and selecting objects with the other in either Project/Hierarchy/Scene is a common workflow.

PatHightree commented 3 years ago

Yeah ok, I've played with it some more and I see what you're saying.

Some improvement ideas :