After using the following code (in an Editor script in an Editor folder), the Pan tool (middle-click + drag) suddenly stops working in the Scene View…
Does anyone else have this issue? – (I’m on 2017.1.0p5 on Windows if it helps…)
[InitializeOnLoadMethod]
public static void InitViewNavigator()
{
SceneView.onSceneGUIDelegate += OnSceneGUI;
}
static void OnSceneGUI(SceneView view)
{
Camera[] scam = Camera.allCameras();
view.LookAt(
scam[0].transform.position +
scam[0].transform.forward ,
scam[0].transform.rotation ,
0f
);
}