I am writing an editor script
I need some way to detect if the user is in ‘Flythrough mode’ as described on this page: Unity - Manual: Scene view navigation
Checking right-click works for the most times, but it sometimes detects false positives.
I tried Tools.current but it doesn’t seem to be registered as its own tool.
Something like sceneView.isFlythrough is what I’m looking for
Hey I’ve been on some kind of epic journey trying to find answers and came across this looking for the same thing. The information doesn’t seem to be listed anywhere, in documentation or forums, and nobody responds (as you can see here).
But I found it:
(Tools.viewTool == ViewTool.FPS)
With Tools.current you can see which tool is selected, but [flythrough mode / “3D Viewport/Fly Mode” / FPS mode] is different, and you can use that code above to detect it. (They call it a bunch of things inconsistently, makes searching hard).
See also / example:
Debug.Log(Tools.current == Tool.Transform);